2004-07-13 05:15:49 +00:00
|
|
|
/* gtkiconview.c
|
2004-07-04 15:56:55 +00:00
|
|
|
* Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnu.org>
|
2002-04-30 17:08:52 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library 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.
|
|
|
|
*/
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
#include <config.h>
|
2002-04-30 17:08:52 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
#include <gdk/gdkkeysyms.h>
|
2004-06-21 04:10:07 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
#include "gtkiconview.h"
|
|
|
|
#include "gtkmarshalers.h"
|
|
|
|
#include "gtkbindings.h"
|
|
|
|
#include "gtkdnd.h"
|
|
|
|
#include "gtkmain.h"
|
|
|
|
#include "gtksignal.h"
|
|
|
|
#include "gtkintl.h"
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
#define MINIMUM_ICON_ITEM_WIDTH 100
|
|
|
|
#define ICON_TEXT_PADDING 3
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
#define ICON_VIEW_TOP_MARGIN 6
|
|
|
|
#define ICON_VIEW_BOTTOM_MARGIN 6
|
|
|
|
#define ICON_VIEW_LEFT_MARGIN 6
|
|
|
|
#define ICON_VIEW_RIGHT_MARGIN 6
|
|
|
|
#define ICON_VIEW_ICON_PADDING 6
|
|
|
|
|
|
|
|
#define GTK_ICON_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ICON_VIEW, GtkIconViewPrivate))
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
#define VALID_MODEL_AND_COLUMNS(obj) ((obj)->priv->model != NULL && \
|
|
|
|
((obj)->priv->pixbuf_column != -1 || \
|
|
|
|
(obj)->priv->text_column != -1 || \
|
|
|
|
(obj)->priv->markup_column != -1))
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 16:08:01 +00:00
|
|
|
typedef struct
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkTreeIter iter;
|
|
|
|
int index;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-06-18 05:17:01 +00:00
|
|
|
gint row, col;
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
/* Bounding boxes */
|
|
|
|
gint x, y;
|
|
|
|
gint width, height;
|
|
|
|
|
|
|
|
gint pixbuf_x, pixbuf_y;
|
|
|
|
gint pixbuf_height, pixbuf_width;
|
|
|
|
|
|
|
|
gint layout_x, layout_y;
|
|
|
|
gint layout_width, layout_height;
|
|
|
|
|
|
|
|
guint selected : 1;
|
|
|
|
guint selected_before_rubberbanding : 1;
|
2004-07-04 16:08:01 +00:00
|
|
|
} GtkIconViewItem;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
struct _GtkIconViewPrivate
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
|
|
|
gint width, height;
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint text_column;
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
gint markup_column;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint pixbuf_column;
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
GtkSelectionMode selection_mode;
|
|
|
|
|
|
|
|
GdkWindow *bin_window;
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkTreeModel *model;
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
GList *items;
|
|
|
|
|
|
|
|
GtkAdjustment *hadjustment;
|
|
|
|
GtkAdjustment *vadjustment;
|
|
|
|
|
|
|
|
guint layout_idle_id;
|
|
|
|
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
gboolean doing_rubberband;
|
2002-04-30 17:08:52 +00:00
|
|
|
gint rubberband_x1, rubberband_y1;
|
|
|
|
gint rubberband_x2, rubberband_y2;
|
2004-05-31 19:44:01 +00:00
|
|
|
|
|
|
|
guint scroll_timeout_id;
|
|
|
|
gint scroll_value_diff;
|
|
|
|
gint event_last_x, event_last_y;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *anchor_item;
|
|
|
|
GtkIconViewItem *cursor_item;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
guint ctrl_pressed : 1;
|
|
|
|
guint shift_pressed : 1;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *last_single_clicked;
|
2004-07-03 20:36:01 +00:00
|
|
|
|
|
|
|
#ifdef DND_WORKS
|
2002-04-30 17:08:52 +00:00
|
|
|
/* Drag-and-drop. */
|
|
|
|
gint pressed_button;
|
|
|
|
gint press_start_x;
|
|
|
|
gint press_start_y;
|
2004-07-03 20:36:01 +00:00
|
|
|
#endif
|
2004-07-27 21:58:09 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
/* Layout used to draw icon text */
|
|
|
|
PangoLayout *layout;
|
2004-07-18 03:39:50 +00:00
|
|
|
|
|
|
|
GtkOrientation orientation;
|
2002-04-30 17:08:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Signals */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ITEM_ACTIVATED,
|
|
|
|
SELECTION_CHANGED,
|
|
|
|
SELECT_ALL,
|
|
|
|
UNSELECT_ALL,
|
|
|
|
SELECT_CURSOR_ITEM,
|
|
|
|
TOGGLE_CURSOR_ITEM,
|
|
|
|
MOVE_CURSOR,
|
2004-07-04 23:19:46 +00:00
|
|
|
ACTIVATE_CURSOR_ITEM,
|
2002-04-30 17:08:52 +00:00
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Properties */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
PROP_PIXBUF_COLUMN,
|
|
|
|
PROP_TEXT_COLUMN,
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
PROP_MARKUP_COLUMN,
|
2002-04-30 17:08:52 +00:00
|
|
|
PROP_SELECTION_MODE,
|
2004-07-18 03:39:50 +00:00
|
|
|
PROP_ORIENTATION,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
PROP_MODEL,
|
2002-04-30 17:08:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* GObject signals */
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_finalize (GObject *object);
|
|
|
|
static void gtk_icon_view_set_property (GObject *object,
|
2002-04-30 17:08:52 +00:00
|
|
|
guint prop_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_get_property (GObject *object,
|
2002-04-30 17:08:52 +00:00
|
|
|
guint prop_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
/* GtkObject signals */
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_destroy (GtkObject *object);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
/* GtkWidget signals */
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_realize (GtkWidget *widget);
|
|
|
|
static void gtk_icon_view_unrealize (GtkWidget *widget);
|
|
|
|
static void gtk_icon_view_map (GtkWidget *widget);
|
|
|
|
static void gtk_icon_view_size_request (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GtkRequisition *requisition);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_size_allocate (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GtkAllocation *allocation);
|
2004-07-04 15:56:55 +00:00
|
|
|
static gboolean gtk_icon_view_expose (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventExpose *expose);
|
2004-07-04 15:56:55 +00:00
|
|
|
static gboolean gtk_icon_view_motion (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventMotion *event);
|
2004-07-04 15:56:55 +00:00
|
|
|
static gboolean gtk_icon_view_button_press (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventButton *event);
|
2004-07-04 15:56:55 +00:00
|
|
|
static gboolean gtk_icon_view_button_release (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventButton *event);
|
2004-07-04 15:56:55 +00:00
|
|
|
/* GtkIconView signals */
|
2004-07-04 23:19:46 +00:00
|
|
|
static void gtk_icon_view_set_adjustments (GtkIconView *icon_view,
|
|
|
|
GtkAdjustment *hadj,
|
|
|
|
GtkAdjustment *vadj);
|
|
|
|
static void gtk_icon_view_real_select_all (GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_real_unselect_all (GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_real_select_cursor_item (GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_real_toggle_cursor_item (GtkIconView *icon_view);
|
|
|
|
static gboolean gtk_icon_view_real_activate_cursor_item (GtkIconView *icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
/* Internal functions */
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_adjustment_changed (GtkAdjustment *adjustment,
|
|
|
|
GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_layout (GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_paint_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GdkRectangle *area);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_paint_rubberband (GtkIconView *icon_view,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GdkRectangle *area);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_queue_draw_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item);
|
|
|
|
static void gtk_icon_view_queue_layout (GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_set_cursor_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item);
|
|
|
|
static void gtk_icon_view_start_rubberbanding (GtkIconView *icon_view,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint x,
|
|
|
|
gint y);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_stop_rubberbanding (GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_update_rubberband_selection (GtkIconView *icon_view);
|
|
|
|
static gboolean gtk_icon_view_item_hit_test (GtkIconViewItem *item,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2004-07-03 20:36:01 +00:00
|
|
|
#ifdef DND_WORKS
|
2004-07-04 15:56:55 +00:00
|
|
|
static gboolean gtk_icon_view_maybe_begin_dragging_items (GtkIconView *icon_view,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GdkEventMotion *event);
|
2004-07-03 20:36:01 +00:00
|
|
|
#endif
|
2004-07-04 15:56:55 +00:00
|
|
|
static gboolean gtk_icon_view_unselect_all_internal (GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_calculate_item_size (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item);
|
|
|
|
static void gtk_icon_view_update_rubberband (gpointer data);
|
|
|
|
static void gtk_icon_view_item_invalidate_size (GtkIconViewItem *item);
|
|
|
|
static void gtk_icon_view_invalidate_sizes (GtkIconView *icon_view);
|
|
|
|
static void gtk_icon_view_add_move_binding (GtkBindingSet *binding_set,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
guint keyval,
|
|
|
|
guint modmask,
|
|
|
|
GtkMovementStep step,
|
|
|
|
gint count);
|
2004-07-04 15:56:55 +00:00
|
|
|
static gboolean gtk_icon_view_real_move_cursor (GtkIconView *icon_view,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkMovementStep step,
|
|
|
|
gint count);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_move_cursor_up_down (GtkIconView *icon_view,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint count);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_move_cursor_page_up_down (GtkIconView *icon_view,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint count);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_move_cursor_left_right (GtkIconView *icon_view,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint count);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint count);
|
2004-07-04 15:56:55 +00:00
|
|
|
static void gtk_icon_view_scroll_to_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item);
|
|
|
|
static GdkPixbuf *gtk_icon_view_get_item_icon (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item);
|
|
|
|
static void gtk_icon_view_update_item_text (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item);
|
|
|
|
static void gtk_icon_view_select_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item);
|
|
|
|
static void gtk_icon_view_unselect_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item);
|
|
|
|
static gboolean gtk_icon_view_select_all_between (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *anchor,
|
|
|
|
GtkIconViewItem *cursor);
|
|
|
|
|
|
|
|
static GtkIconViewItem *gtk_icon_view_get_item_at_pos (GtkIconView *icon_view,
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
gint x,
|
|
|
|
gint y);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
static GtkContainerClass *parent_class = NULL;
|
2004-07-04 15:56:55 +00:00
|
|
|
static guint icon_view_signals[LAST_SIGNAL] = { 0 };
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
G_DEFINE_TYPE (GtkIconView, gtk_icon_view, GTK_TYPE_CONTAINER);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_class_init (GtkIconViewClass *klass)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
|
|
|
GObjectClass *gobject_class;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkObjectClass *object_class;
|
2002-04-30 17:08:52 +00:00
|
|
|
GtkWidgetClass *widget_class;
|
|
|
|
GtkBindingSet *binding_set;
|
|
|
|
|
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
|
|
|
binding_set = gtk_binding_set_by_class (klass);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_type_class_add_private (klass, sizeof (GtkIconViewPrivate));
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
gobject_class = (GObjectClass *) klass;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
object_class = (GtkObjectClass *) klass;
|
2002-04-30 17:08:52 +00:00
|
|
|
widget_class = (GtkWidgetClass *) klass;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gobject_class->finalize = gtk_icon_view_finalize;
|
|
|
|
gobject_class->set_property = gtk_icon_view_set_property;
|
|
|
|
gobject_class->get_property = gtk_icon_view_get_property;
|
|
|
|
|
|
|
|
object_class->destroy = gtk_icon_view_destroy;
|
|
|
|
|
|
|
|
widget_class->realize = gtk_icon_view_realize;
|
|
|
|
widget_class->unrealize = gtk_icon_view_unrealize;
|
|
|
|
widget_class->map = gtk_icon_view_map;
|
|
|
|
widget_class->size_request = gtk_icon_view_size_request;
|
|
|
|
widget_class->size_allocate = gtk_icon_view_size_allocate;
|
|
|
|
widget_class->expose_event = gtk_icon_view_expose;
|
|
|
|
widget_class->motion_notify_event = gtk_icon_view_motion;
|
|
|
|
widget_class->button_press_event = gtk_icon_view_button_press;
|
|
|
|
widget_class->button_release_event = gtk_icon_view_button_release;
|
2004-07-27 21:58:09 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
klass->set_scroll_adjustments = gtk_icon_view_set_adjustments;
|
|
|
|
klass->select_all = gtk_icon_view_real_select_all;
|
|
|
|
klass->unselect_all = gtk_icon_view_real_unselect_all;
|
|
|
|
klass->select_cursor_item = gtk_icon_view_real_select_cursor_item;
|
|
|
|
klass->toggle_cursor_item = gtk_icon_view_real_toggle_cursor_item;
|
2004-07-04 23:19:46 +00:00
|
|
|
klass->activate_cursor_item = gtk_icon_view_real_activate_cursor_item;
|
2004-07-04 15:56:55 +00:00
|
|
|
klass->move_cursor = gtk_icon_view_real_move_cursor;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
/* Properties */
|
2004-07-13 05:15:49 +00:00
|
|
|
/**
|
|
|
|
* GtkIconView:selection-mode:
|
|
|
|
*
|
|
|
|
* The ::selection-mode property specifies the selection mode of
|
|
|
|
* icon view. If the mode is #GTK_SELECTION_MULTIPLE, rubberband selection
|
|
|
|
* is enabled, for the other modes, only keyboard selection is possible.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
*/
|
2002-04-30 17:08:52 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_SELECTION_MODE,
|
|
|
|
g_param_spec_enum ("selection_mode",
|
2004-07-04 15:56:55 +00:00
|
|
|
P_("Selection mode"),
|
|
|
|
P_("The selection mode"),
|
2002-04-30 17:08:52 +00:00
|
|
|
GTK_TYPE_SELECTION_MODE,
|
|
|
|
GTK_SELECTION_SINGLE,
|
|
|
|
G_PARAM_READWRITE));
|
|
|
|
|
2004-07-13 05:15:49 +00:00
|
|
|
/**
|
|
|
|
* GtkIconView:pixbuf-column:
|
|
|
|
*
|
|
|
|
* The ::pixbuf-column property contains the number of the model column
|
|
|
|
* containing the pixbufs which are displayed. The pixbuf column must be
|
|
|
|
* of type #GDK_TYPE_PIXBUF. Setting this property to -1 turns off the
|
|
|
|
* display of pixbufs.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
*/
|
2002-04-30 17:08:52 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
PROP_PIXBUF_COLUMN,
|
|
|
|
g_param_spec_int ("pixbuf_column",
|
2004-07-04 15:56:55 +00:00
|
|
|
P_("Pixbuf column"),
|
|
|
|
P_("Model column used to retrieve the icon pixbuf from"),
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
-1, G_MAXINT, -1,
|
|
|
|
G_PARAM_READWRITE));
|
|
|
|
|
2004-07-13 05:15:49 +00:00
|
|
|
/**
|
|
|
|
* GtkIconView:text-column:
|
|
|
|
*
|
|
|
|
* The ::text-column property contains the number of the model column
|
|
|
|
* containing the texts which are displayed. The text column must be
|
|
|
|
* of type #G_TYPE_STRING. If this property and the :markup-column
|
|
|
|
* property are both set to -1, no texts are displayed.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
*/
|
2002-04-30 17:08:52 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
PROP_TEXT_COLUMN,
|
|
|
|
g_param_spec_int ("text_column",
|
2004-07-04 15:56:55 +00:00
|
|
|
P_("Text column"),
|
|
|
|
P_("Model column used to retrieve the text from"),
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
-1, G_MAXINT, -1,
|
|
|
|
G_PARAM_READWRITE));
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-13 05:15:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GtkIconView:markup-column:
|
|
|
|
*
|
|
|
|
* The ::markup-column property contains the number of the model column
|
|
|
|
* containing markup information to be displayed. The markup column must be
|
|
|
|
* of type #G_TYPE_STRING. If this property and the :text-column property
|
|
|
|
* are both set to column numbers, it overrides the text column.
|
|
|
|
* If both are set to -1, no texts are displayed.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
*/
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_MARKUP_COLUMN,
|
|
|
|
g_param_spec_int ("markup_column",
|
2004-07-04 15:56:55 +00:00
|
|
|
P_("Markup column"),
|
2004-07-13 05:15:49 +00:00
|
|
|
P_("Model column used to retrieve the text if using Pango markup"),
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
-1, G_MAXINT, -1,
|
|
|
|
G_PARAM_READWRITE));
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_MODEL,
|
|
|
|
g_param_spec_object ("model",
|
2004-07-13 05:15:49 +00:00
|
|
|
P_("Icon View Model"),
|
|
|
|
P_("The model for the icon view"),
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GTK_TYPE_TREE_MODEL,
|
|
|
|
G_PARAM_READWRITE));
|
|
|
|
|
2004-07-18 03:39:50 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_ORIENTATION,
|
|
|
|
g_param_spec_enum ("orientation",
|
|
|
|
P_("Orientation"),
|
|
|
|
P_("How the text and icon of each item are positioned relative to each other"),
|
|
|
|
GTK_TYPE_ORIENTATION,
|
|
|
|
GTK_ORIENTATION_VERTICAL,
|
|
|
|
G_PARAM_READWRITE));
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
/* Style properties */
|
2003-07-03 13:10:41 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_boxed ("selection_box_color",
|
2004-07-04 15:56:55 +00:00
|
|
|
P_("Selection Box Color"),
|
|
|
|
P_("Color of the selection box"),
|
2003-07-03 13:10:41 +00:00
|
|
|
GDK_TYPE_COLOR,
|
|
|
|
G_PARAM_READABLE));
|
|
|
|
|
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_uchar ("selection_box_alpha",
|
2004-07-04 15:56:55 +00:00
|
|
|
P_("Selection Box Alpha"),
|
|
|
|
P_("Opacity of the selection box"),
|
2003-07-03 13:10:41 +00:00
|
|
|
0, 0xff,
|
|
|
|
0x40,
|
|
|
|
G_PARAM_READABLE));
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
/* Signals */
|
|
|
|
widget_class->set_scroll_adjustments_signal =
|
|
|
|
g_signal_new ("set_scroll_adjustments",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
2004-07-04 15:56:55 +00:00
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, set_scroll_adjustments),
|
2002-04-30 17:08:52 +00:00
|
|
|
NULL, NULL,
|
2004-07-04 15:56:55 +00:00
|
|
|
_gtk_marshal_VOID__OBJECT_OBJECT,
|
2002-04-30 17:08:52 +00:00
|
|
|
G_TYPE_NONE, 2,
|
|
|
|
GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view_signals[ITEM_ACTIVATED] =
|
2002-04-30 17:08:52 +00:00
|
|
|
g_signal_new ("item_activated",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
2004-07-04 15:56:55 +00:00
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, item_activated),
|
2002-04-30 17:08:52 +00:00
|
|
|
NULL, NULL,
|
2002-07-29 21:11:23 +00:00
|
|
|
g_cclosure_marshal_VOID__BOXED,
|
2002-04-30 17:08:52 +00:00
|
|
|
G_TYPE_NONE, 1,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GTK_TYPE_TREE_PATH);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view_signals[SELECTION_CHANGED] =
|
2002-04-30 17:08:52 +00:00
|
|
|
g_signal_new ("selection_changed",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_FIRST,
|
2004-07-04 15:56:55 +00:00
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, selection_changed),
|
2002-04-30 17:08:52 +00:00
|
|
|
NULL, NULL,
|
|
|
|
g_cclosure_marshal_VOID__VOID,
|
|
|
|
G_TYPE_NONE, 0);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view_signals[SELECT_ALL] =
|
2002-04-30 17:08:52 +00:00
|
|
|
g_signal_new ("select_all",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
2004-07-04 15:56:55 +00:00
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, select_all),
|
2002-04-30 17:08:52 +00:00
|
|
|
NULL, NULL,
|
|
|
|
g_cclosure_marshal_VOID__VOID,
|
|
|
|
G_TYPE_NONE, 0);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view_signals[UNSELECT_ALL] =
|
2002-04-30 17:08:52 +00:00
|
|
|
g_signal_new ("unselect_all",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
2004-07-04 15:56:55 +00:00
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, unselect_all),
|
2002-04-30 17:08:52 +00:00
|
|
|
NULL, NULL,
|
|
|
|
g_cclosure_marshal_VOID__VOID,
|
|
|
|
G_TYPE_NONE, 0);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view_signals[SELECT_CURSOR_ITEM] =
|
2002-04-30 17:08:52 +00:00
|
|
|
g_signal_new ("select_cursor_item",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
2004-07-04 15:56:55 +00:00
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, select_cursor_item),
|
2002-04-30 17:08:52 +00:00
|
|
|
NULL, NULL,
|
|
|
|
g_cclosure_marshal_VOID__VOID,
|
|
|
|
G_TYPE_NONE, 0);
|
|
|
|
|
2004-07-04 23:19:46 +00:00
|
|
|
icon_view_signals[TOGGLE_CURSOR_ITEM] =
|
2002-04-30 17:08:52 +00:00
|
|
|
g_signal_new ("toggle_cursor_item",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
2004-07-04 15:56:55 +00:00
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, toggle_cursor_item),
|
2002-04-30 17:08:52 +00:00
|
|
|
NULL, NULL,
|
|
|
|
g_cclosure_marshal_VOID__VOID,
|
|
|
|
G_TYPE_NONE, 0);
|
|
|
|
|
2004-07-04 23:19:46 +00:00
|
|
|
icon_view_signals[ACTIVATE_CURSOR_ITEM] =
|
|
|
|
g_signal_new ("activate_cursor_item",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, activate_cursor_item),
|
|
|
|
NULL, NULL,
|
|
|
|
_gtk_marshal_BOOLEAN__VOID,
|
|
|
|
G_TYPE_BOOLEAN, 0);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view_signals[MOVE_CURSOR] =
|
2004-06-18 05:17:01 +00:00
|
|
|
g_signal_new ("move_cursor",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
2004-07-04 15:56:55 +00:00
|
|
|
G_STRUCT_OFFSET (GtkIconViewClass, move_cursor),
|
2004-06-18 05:17:01 +00:00
|
|
|
NULL, NULL,
|
2004-07-04 15:56:55 +00:00
|
|
|
_gtk_marshal_BOOLEAN__ENUM_INT,
|
2004-06-18 05:17:01 +00:00
|
|
|
G_TYPE_BOOLEAN, 2,
|
|
|
|
GTK_TYPE_MOVEMENT_STEP,
|
|
|
|
G_TYPE_INT);
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
/* Key bindings */
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK, "select_all", 0);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "unselect_all", 0);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_space, 0, "select_cursor_item", 0);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK, "toggle_cursor_item", 0);
|
|
|
|
|
2004-07-04 23:19:46 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0, "activate_cursor_item", 0);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0, "activate_cursor_item", 0);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0, "activate_cursor_item", 0);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_Up, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_DISPLAY_LINES, -1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_KP_Up, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_DISPLAY_LINES, -1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_Down, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_DISPLAY_LINES, 1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_KP_Down, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_DISPLAY_LINES, 1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_p, GDK_CONTROL_MASK,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_DISPLAY_LINES, -1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_n, GDK_CONTROL_MASK,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_DISPLAY_LINES, 1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_Home, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_BUFFER_ENDS, -1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_KP_Home, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_BUFFER_ENDS, -1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_End, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_BUFFER_ENDS, 1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_KP_End, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_BUFFER_ENDS, 1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_Page_Up, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_PAGES, -1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_KP_Page_Up, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_PAGES, -1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_Page_Down, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_PAGES, 1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_KP_Page_Down, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_PAGES, 1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_Right, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_VISUAL_POSITIONS, 1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_Left, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_KP_Right, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_VISUAL_POSITIONS, 1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (binding_set, GDK_KP_Left, 0,
|
2004-06-18 05:17:01 +00:00
|
|
|
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_init (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv = GTK_ICON_VIEW_GET_PRIVATE (icon_view);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->width = 0;
|
|
|
|
icon_view->priv->height = 0;
|
|
|
|
icon_view->priv->selection_mode = GTK_SELECTION_SINGLE;
|
2004-07-03 20:36:01 +00:00
|
|
|
#ifdef DND_WORKS
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->pressed_button = -1;
|
|
|
|
icon_view->priv->press_start_x = -1;
|
|
|
|
icon_view->priv->press_start_y = -1;
|
2004-07-03 20:36:01 +00:00
|
|
|
#endif
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->text_column = -1;
|
|
|
|
icon_view->priv->markup_column = -1;
|
|
|
|
icon_view->priv->pixbuf_column = -1;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->layout = gtk_widget_create_pango_layout (GTK_WIDGET (icon_view), NULL);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
pango_layout_set_wrap (icon_view->priv->layout, PANGO_WRAP_WORD_CHAR);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
GTK_WIDGET_SET_FLAGS (icon_view, GTK_CAN_FOCUS);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_adjustments (icon_view, NULL, NULL);
|
2004-07-18 03:39:50 +00:00
|
|
|
|
|
|
|
icon_view->priv->orientation = GTK_ORIENTATION_VERTICAL;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_destroy (GtkObject *object)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (object);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_model (icon_view, NULL);
|
2004-05-31 19:44:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->layout_idle_id != 0)
|
|
|
|
g_source_remove (icon_view->priv->layout_idle_id);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->scroll_timeout_id != 0)
|
|
|
|
g_source_remove (icon_view->priv->scroll_timeout_id);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
(GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* GObject methods */
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_finalize (GObject *object)
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (object);
|
2004-05-31 19:44:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_object_unref (icon_view->priv->layout);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
(G_OBJECT_CLASS (parent_class)->finalize) (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_property (GObject *object,
|
2002-04-30 17:08:52 +00:00
|
|
|
guint prop_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (object);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
switch (prop_id)
|
|
|
|
{
|
|
|
|
case PROP_SELECTION_MODE:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_selection_mode (icon_view, g_value_get_enum (value));
|
2002-04-30 17:08:52 +00:00
|
|
|
break;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
case PROP_PIXBUF_COLUMN:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_pixbuf_column (icon_view, g_value_get_int (value));
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
break;
|
|
|
|
case PROP_TEXT_COLUMN:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_text_column (icon_view, g_value_get_int (value));
|
2002-04-30 17:08:52 +00:00
|
|
|
break;
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
case PROP_MARKUP_COLUMN:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_markup_column (icon_view, g_value_get_int (value));
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
break;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
case PROP_MODEL:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_model (icon_view, g_value_get_object (value));
|
2002-04-30 17:08:52 +00:00
|
|
|
break;
|
2004-07-18 03:39:50 +00:00
|
|
|
case PROP_ORIENTATION:
|
|
|
|
gtk_icon_view_set_orientation (icon_view, g_value_get_enum (value));
|
|
|
|
break;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_property (GObject *object,
|
2002-04-30 17:08:52 +00:00
|
|
|
guint prop_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (object);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
switch (prop_id)
|
|
|
|
{
|
|
|
|
case PROP_SELECTION_MODE:
|
2004-07-04 15:56:55 +00:00
|
|
|
g_value_set_enum (value, icon_view->priv->selection_mode);
|
2002-04-30 17:08:52 +00:00
|
|
|
break;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
case PROP_PIXBUF_COLUMN:
|
2004-07-04 15:56:55 +00:00
|
|
|
g_value_set_int (value, icon_view->priv->pixbuf_column);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
break;
|
|
|
|
case PROP_TEXT_COLUMN:
|
2004-07-04 15:56:55 +00:00
|
|
|
g_value_set_int (value, icon_view->priv->text_column);
|
2002-04-30 17:08:52 +00:00
|
|
|
break;
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
case PROP_MARKUP_COLUMN:
|
2004-07-04 15:56:55 +00:00
|
|
|
g_value_set_int (value, icon_view->priv->markup_column);
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
break;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
case PROP_MODEL:
|
2004-07-04 15:56:55 +00:00
|
|
|
g_value_set_object (value, icon_view->priv->model);
|
2002-04-30 17:08:52 +00:00
|
|
|
break;
|
2004-07-18 03:39:50 +00:00
|
|
|
case PROP_ORIENTATION:
|
|
|
|
g_value_set_enum (value, icon_view->priv->orientation);
|
|
|
|
break;
|
2002-04-30 17:08:52 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* GtkWidget signals */
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_realize (GtkWidget *widget)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkWindowAttr attributes;
|
|
|
|
gint attributes_mask;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
|
|
|
|
|
|
|
/* Make the main, clipping window */
|
|
|
|
attributes.window_type = GDK_WINDOW_CHILD;
|
|
|
|
attributes.x = widget->allocation.x;
|
|
|
|
attributes.y = widget->allocation.y;
|
|
|
|
attributes.width = widget->allocation.width;
|
|
|
|
attributes.height = widget->allocation.height;
|
|
|
|
attributes.wclass = GDK_INPUT_OUTPUT;
|
|
|
|
attributes.visual = gtk_widget_get_visual (widget);
|
|
|
|
attributes.colormap = gtk_widget_get_colormap (widget);
|
|
|
|
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
|
|
|
|
|
|
|
|
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
|
|
|
|
|
|
|
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
|
|
|
&attributes, attributes_mask);
|
|
|
|
gdk_window_set_user_data (widget->window, widget);
|
|
|
|
|
2004-07-13 05:15:49 +00:00
|
|
|
/* Make the window for the icon view */
|
2002-04-30 17:08:52 +00:00
|
|
|
attributes.x = 0;
|
|
|
|
attributes.y = 0;
|
2004-07-04 15:56:55 +00:00
|
|
|
attributes.width = MAX (icon_view->priv->width, widget->allocation.width);
|
|
|
|
attributes.height = MAX (icon_view->priv->height, widget->allocation.height);
|
2002-04-30 17:08:52 +00:00
|
|
|
attributes.event_mask = (GDK_EXPOSURE_MASK |
|
|
|
|
GDK_SCROLL_MASK |
|
|
|
|
GDK_POINTER_MOTION_MASK |
|
|
|
|
GDK_BUTTON_PRESS_MASK |
|
|
|
|
GDK_BUTTON_RELEASE_MASK |
|
|
|
|
GDK_KEY_PRESS_MASK |
|
|
|
|
GDK_KEY_RELEASE_MASK) |
|
|
|
|
gtk_widget_get_events (widget);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->bin_window = gdk_window_new (widget->window,
|
2002-04-30 17:08:52 +00:00
|
|
|
&attributes, attributes_mask);
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_set_user_data (icon_view->priv->bin_window, widget);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
widget->style = gtk_style_attach (widget->style, widget->window);
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_set_background (icon_view->priv->bin_window, &widget->style->base[widget->state]);
|
2002-04-30 17:08:52 +00:00
|
|
|
gdk_window_set_background (widget->window, &widget->style->base[widget->state]);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unrealize (GtkWidget *widget)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_set_user_data (icon_view->priv->bin_window, NULL);
|
|
|
|
gdk_window_destroy (icon_view->priv->bin_window);
|
|
|
|
icon_view->priv->bin_window = NULL;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
/* GtkWidget::unrealize destroys children and widget->window */
|
|
|
|
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
|
|
|
|
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_map (GtkWidget *widget)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_show (icon_view->priv->bin_window);
|
2002-04-30 17:08:52 +00:00
|
|
|
gdk_window_show (widget->window);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_size_request (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GtkRequisition *requisition)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
requisition->width = icon_view->priv->width;
|
|
|
|
requisition->height = icon_view->priv->height;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_size_allocate (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GtkAllocation *allocation)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
widget->allocation = *allocation;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
if (GTK_WIDGET_REALIZED (widget))
|
|
|
|
{
|
|
|
|
gdk_window_move_resize (widget->window,
|
|
|
|
allocation->x, allocation->y,
|
|
|
|
allocation->width, allocation->height);
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_resize (icon_view->priv->bin_window,
|
|
|
|
MAX (icon_view->priv->width, allocation->width),
|
|
|
|
MAX (icon_view->priv->height, allocation->height));
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->hadjustment->page_size = allocation->width;
|
|
|
|
icon_view->priv->hadjustment->page_increment = allocation->width * 0.9;
|
|
|
|
icon_view->priv->hadjustment->step_increment = allocation->width * 0.1;
|
|
|
|
icon_view->priv->hadjustment->lower = 0;
|
|
|
|
icon_view->priv->hadjustment->upper = MAX (allocation->width, icon_view->priv->width);
|
|
|
|
gtk_adjustment_changed (icon_view->priv->hadjustment);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->vadjustment->page_size = allocation->height;
|
|
|
|
icon_view->priv->vadjustment->page_increment = allocation->height * 0.9;
|
|
|
|
icon_view->priv->vadjustment->step_increment = allocation->width * 0.1;
|
|
|
|
icon_view->priv->vadjustment->lower = 0;
|
|
|
|
icon_view->priv->vadjustment->upper = MAX (allocation->height, icon_view->priv->height);
|
|
|
|
gtk_adjustment_changed (icon_view->priv->vadjustment);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_layout (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_expose (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventExpose *expose)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
GList *icons;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (expose->window != icon_view->priv->bin_window)
|
2002-04-30 17:08:52 +00:00
|
|
|
return FALSE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (icons = icon_view->priv->items; icons; icons = icons->next) {
|
|
|
|
GtkIconViewItem *item = icons->data;
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkRectangle item_rectangle;
|
|
|
|
|
|
|
|
item_rectangle.x = item->x;
|
|
|
|
item_rectangle.y = item->y;
|
|
|
|
item_rectangle.width = item->width;
|
|
|
|
item_rectangle.height = item->height;
|
|
|
|
|
|
|
|
if (gdk_region_rect_in (expose->region, &item_rectangle) == GDK_OVERLAP_RECTANGLE_OUT)
|
|
|
|
continue;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_paint_item (icon_view, item, &expose->area);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->doing_rubberband)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
|
|
|
GdkRectangle *rectangles;
|
|
|
|
gint n_rectangles;
|
|
|
|
|
|
|
|
gdk_region_get_rectangles (expose->region,
|
|
|
|
&rectangles,
|
|
|
|
&n_rectangles);
|
|
|
|
|
|
|
|
while (n_rectangles--)
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_paint_rubberband (icon_view, &rectangles[n_rectangles]);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
g_free (rectangles);
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2004-05-31 19:44:01 +00:00
|
|
|
static gboolean
|
|
|
|
scroll_timeout (gpointer data)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2004-05-31 19:44:01 +00:00
|
|
|
gdouble value;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = data;
|
2004-05-31 19:44:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
value = MIN (icon_view->priv->vadjustment->value +
|
|
|
|
icon_view->priv->scroll_value_diff,
|
|
|
|
icon_view->priv->vadjustment->upper -
|
|
|
|
icon_view->priv->vadjustment->page_size);
|
2004-05-31 19:44:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_adjustment_set_value (icon_view->priv->vadjustment,
|
2004-05-31 19:44:01 +00:00
|
|
|
value);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_update_rubberband (icon_view);
|
2004-05-31 19:44:01 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_motion (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventMotion *event)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2004-05-31 19:44:01 +00:00
|
|
|
gint abs_y;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2004-07-03 20:36:01 +00:00
|
|
|
#ifdef DND_WORKS
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_maybe_begin_dragging_items (icon_view, event);
|
2004-07-03 20:36:01 +00:00
|
|
|
#endif
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->doing_rubberband)
|
2004-05-31 19:44:01 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_update_rubberband (widget);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
abs_y = event->y - icon_view->priv->height *
|
|
|
|
(icon_view->priv->vadjustment->value /
|
|
|
|
(icon_view->priv->vadjustment->upper -
|
|
|
|
icon_view->priv->vadjustment->lower));
|
2004-05-31 19:44:01 +00:00
|
|
|
|
|
|
|
if (abs_y < 0 || abs_y > widget->allocation.height)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->scroll_timeout_id == 0)
|
|
|
|
icon_view->priv->scroll_timeout_id = g_timeout_add (30, scroll_timeout, icon_view);
|
2004-05-31 19:44:01 +00:00
|
|
|
|
|
|
|
if (abs_y < 0)
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->scroll_value_diff = abs_y;
|
2004-05-31 19:44:01 +00:00
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->scroll_value_diff = abs_y - widget->allocation.height;
|
2004-05-31 19:44:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->event_last_x = event->x;
|
|
|
|
icon_view->priv->event_last_y = event->y;
|
2004-05-31 19:44:01 +00:00
|
|
|
}
|
2004-07-04 15:56:55 +00:00
|
|
|
else if (icon_view->priv->scroll_timeout_id != 0)
|
2004-05-31 19:44:01 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_source_remove (icon_view->priv->scroll_timeout_id);
|
2004-05-31 19:44:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->scroll_timeout_id = 0;
|
2004-05-31 19:44:01 +00:00
|
|
|
}
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_button_press (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventButton *event)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
|
|
|
GtkIconViewItem *item;
|
2002-04-30 17:08:52 +00:00
|
|
|
gboolean dirty = FALSE;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (event->window != icon_view->priv->bin_window)
|
2002-04-30 17:08:52 +00:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (!GTK_WIDGET_HAS_FOCUS (widget))
|
|
|
|
gtk_widget_grab_focus (widget);
|
|
|
|
|
|
|
|
if (event->button == 1 && event->type == GDK_BUTTON_PRESS)
|
|
|
|
{
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = gtk_icon_view_get_item_at_pos (icon_view,
|
2002-04-30 17:08:52 +00:00
|
|
|
event->x, event->y);
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
if (item != NULL)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_scroll_to_item (icon_view, item);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode == GTK_SELECTION_NONE)
|
2004-06-21 03:41:04 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_cursor_item (icon_view, item);
|
2004-06-21 03:41:04 +00:00
|
|
|
}
|
2004-07-04 15:56:55 +00:00
|
|
|
else if (icon_view->priv->selection_mode == GTK_SELECTION_MULTIPLE &&
|
2004-06-21 03:41:04 +00:00
|
|
|
(event->state & GDK_SHIFT_MASK))
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all_internal (icon_view);
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_cursor_item (icon_view, item);
|
|
|
|
if (!icon_view->priv->anchor_item)
|
|
|
|
icon_view->priv->anchor_item = item;
|
2004-06-18 05:17:01 +00:00
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_all_between (icon_view,
|
|
|
|
icon_view->priv->anchor_item,
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
item);
|
2002-04-30 17:08:52 +00:00
|
|
|
dirty = TRUE;
|
|
|
|
}
|
2004-06-18 05:17:01 +00:00
|
|
|
else
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode == GTK_SELECTION_MULTIPLE &&
|
2004-06-18 05:17:01 +00:00
|
|
|
(event->state & GDK_CONTROL_MASK))
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-06-18 05:17:01 +00:00
|
|
|
item->selected = !item->selected;
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
2002-04-30 17:08:52 +00:00
|
|
|
dirty = TRUE;
|
|
|
|
}
|
2004-06-18 05:17:01 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!item->selected)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all_internal (icon_view);
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
item->selected = TRUE;
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
2004-06-18 05:17:01 +00:00
|
|
|
dirty = TRUE;
|
|
|
|
}
|
|
|
|
}
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_cursor_item (icon_view, item);
|
|
|
|
icon_view->priv->anchor_item = item;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
2004-07-03 20:36:01 +00:00
|
|
|
#ifdef DND_WORKS
|
2002-04-30 17:08:52 +00:00
|
|
|
/* Save press to possibly begin a drag */
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->pressed_button < 0)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->pressed_button = event->button;
|
|
|
|
icon_view->priv->press_start_x = event->x;
|
|
|
|
icon_view->priv->press_start_y = event->y;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
2004-07-03 20:36:01 +00:00
|
|
|
#endif
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->last_single_clicked)
|
|
|
|
icon_view->priv->last_single_clicked = item;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode != GTK_SELECTION_BROWSE &&
|
2002-04-30 17:08:52 +00:00
|
|
|
!(event->state & GDK_CONTROL_MASK))
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
dirty = gtk_icon_view_unselect_all_internal (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode == GTK_SELECTION_MULTIPLE)
|
|
|
|
gtk_icon_view_start_rubberbanding (icon_view, event->x, event->y);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (event->button == 1 && event->type == GDK_2BUTTON_PRESS)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
item = gtk_icon_view_get_item_at_pos (icon_view,
|
2002-04-30 17:08:52 +00:00
|
|
|
event->x, event->y);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (item && item == icon_view->priv->last_single_clicked)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkTreePath *path;
|
|
|
|
|
|
|
|
path = gtk_tree_path_new_from_indices (item->index, -1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_item_activated (icon_view, path);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gtk_tree_path_free (path);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->last_single_clicked = NULL;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (dirty)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_button_release (GtkWidget *widget,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventButton *event)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (widget);
|
2004-07-03 20:36:01 +00:00
|
|
|
|
|
|
|
#ifdef DND_WORKS
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->pressed_button == event->button)
|
|
|
|
icon_view->priv->pressed_button = -1;
|
2004-07-03 20:36:01 +00:00
|
|
|
#endif
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_stop_rubberbanding (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->scroll_timeout_id != 0)
|
2004-05-31 19:44:01 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_source_remove (icon_view->priv->scroll_timeout_id);
|
|
|
|
icon_view->priv->scroll_timeout_id = 0;
|
2004-05-31 19:44:01 +00:00
|
|
|
}
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_update_rubberband (gpointer data)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
gint x, y;
|
|
|
|
GdkRectangle old_area;
|
|
|
|
GdkRectangle new_area;
|
|
|
|
GdkRectangle common;
|
|
|
|
GdkRegion *invalid_region;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (data);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_get_pointer (icon_view->priv->bin_window, &x, &y, NULL);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
x = MAX (x, 0);
|
|
|
|
y = MAX (y, 0);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
old_area.x = MIN (icon_view->priv->rubberband_x1,
|
|
|
|
icon_view->priv->rubberband_x2);
|
|
|
|
old_area.y = MIN (icon_view->priv->rubberband_y1,
|
|
|
|
icon_view->priv->rubberband_y2);
|
|
|
|
old_area.width = ABS (icon_view->priv->rubberband_x2 -
|
|
|
|
icon_view->priv->rubberband_x1) + 1;
|
|
|
|
old_area.height = ABS (icon_view->priv->rubberband_y2 -
|
|
|
|
icon_view->priv->rubberband_y1) + 1;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
new_area.x = MIN (icon_view->priv->rubberband_x1, x);
|
|
|
|
new_area.y = MIN (icon_view->priv->rubberband_y1, y);
|
|
|
|
new_area.width = ABS (x - icon_view->priv->rubberband_x1) + 1;
|
|
|
|
new_area.height = ABS (y - icon_view->priv->rubberband_y1) + 1;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2002-08-20 19:50:19 +00:00
|
|
|
invalid_region = gdk_region_rectangle (&old_area);
|
|
|
|
gdk_region_union_with_rect (invalid_region, &new_area);
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
gdk_rectangle_intersect (&old_area, &new_area, &common);
|
2002-08-20 19:50:19 +00:00
|
|
|
if (common.width > 2 && common.height > 2)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2002-08-20 19:50:19 +00:00
|
|
|
GdkRegion *common_region;
|
|
|
|
|
|
|
|
/* make sure the border is invalidated */
|
2002-04-30 17:08:52 +00:00
|
|
|
common.x += 1;
|
|
|
|
common.y += 1;
|
2002-08-20 19:50:19 +00:00
|
|
|
common.width -= 2;
|
2002-04-30 17:08:52 +00:00
|
|
|
common.height -= 2;
|
2002-08-20 19:50:19 +00:00
|
|
|
|
|
|
|
common_region = gdk_region_rectangle (&common);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2002-08-20 19:50:19 +00:00
|
|
|
gdk_region_subtract (invalid_region, common_region);
|
|
|
|
gdk_region_destroy (common_region);
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_invalidate_region (icon_view->priv->bin_window, invalid_region, TRUE);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
gdk_region_destroy (invalid_region);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->rubberband_x2 = x;
|
|
|
|
icon_view->priv->rubberband_y2 = y;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_update_rubberband_selection (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_start_rubberbanding (GtkIconView *icon_view,
|
2002-04-30 17:08:52 +00:00
|
|
|
gint x,
|
|
|
|
gint y)
|
|
|
|
{
|
|
|
|
GList *items;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_assert (!icon_view->priv->doing_rubberband);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (items = icon_view->priv->items; items; items = items->next)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = items->data;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
item->selected_before_rubberbanding = item->selected;
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->rubberband_x1 = x;
|
|
|
|
icon_view->priv->rubberband_y1 = y;
|
|
|
|
icon_view->priv->rubberband_x2 = x;
|
|
|
|
icon_view->priv->rubberband_y2 = y;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->doing_rubberband = TRUE;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_grab_add (GTK_WIDGET (icon_view));
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_stop_rubberbanding (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->doing_rubberband)
|
2002-04-30 17:08:52 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->doing_rubberband = FALSE;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_grab_remove (GTK_WIDGET (icon_view));
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_widget_queue_draw (GTK_WIDGET (icon_view));
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_update_rubberband_selection (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
|
|
|
GList *items;
|
|
|
|
gint x, y, width, height;
|
|
|
|
gboolean dirty = FALSE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
x = MIN (icon_view->priv->rubberband_x1,
|
|
|
|
icon_view->priv->rubberband_x2);
|
|
|
|
y = MIN (icon_view->priv->rubberband_y1,
|
|
|
|
icon_view->priv->rubberband_y2);
|
|
|
|
width = ABS (icon_view->priv->rubberband_x1 -
|
|
|
|
icon_view->priv->rubberband_x2);
|
|
|
|
height = ABS (icon_view->priv->rubberband_y1 -
|
|
|
|
icon_view->priv->rubberband_y2);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (items = icon_view->priv->items; items; items = items->next)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = items->data;
|
2002-04-30 17:08:52 +00:00
|
|
|
gboolean is_in;
|
|
|
|
gboolean selected;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
is_in = gtk_icon_view_item_hit_test (item, x, y, width, height);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
selected = is_in ^ item->selected_before_rubberbanding;
|
|
|
|
|
|
|
|
if (item->selected != selected)
|
|
|
|
{
|
|
|
|
item->selected = selected;
|
|
|
|
dirty = TRUE;
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dirty)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_item_hit_test (GtkIconViewItem *item,
|
2002-04-30 17:08:52 +00:00
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height)
|
|
|
|
{
|
|
|
|
/* First try the pixbuf */
|
|
|
|
if (MIN (x + width, item->pixbuf_x + item->pixbuf_width) - MAX (x, item->pixbuf_x) > 0 &&
|
|
|
|
MIN (y + height, item->pixbuf_y + item->pixbuf_height) - MAX (y, item->pixbuf_y) > 0)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* Then try the text */
|
|
|
|
if (MIN (x + width, item->layout_x + item->layout_width) - MAX (x, item->layout_x) > 0 &&
|
|
|
|
MIN (y + height, item->layout_y + item->layout_height) - MAX (y, item->layout_y) > 0)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-07-03 20:36:01 +00:00
|
|
|
#ifdef DND_WORKS
|
2002-04-30 17:08:52 +00:00
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_maybe_begin_dragging_items (GtkIconView *icon_view,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkEventMotion *event)
|
|
|
|
{
|
|
|
|
gboolean retval = FALSE;
|
|
|
|
gint button;
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->pressed_button < 0)
|
2002-04-30 17:08:52 +00:00
|
|
|
return retval;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!gtk_drag_check_threshold (GTK_WIDGET (icon_view),
|
|
|
|
icon_view->priv->press_start_x,
|
|
|
|
icon_view->priv->press_start_y,
|
2002-04-30 17:08:52 +00:00
|
|
|
event->x, event->y))
|
|
|
|
return retval;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
button = icon_view->priv->pressed_button;
|
|
|
|
icon_view->priv->pressed_button = -1;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
static GtkTargetEntry row_targets[] = {
|
2004-07-04 15:56:55 +00:00
|
|
|
{ "GTK_ICON_VIEW_ITEMS", GTK_TARGET_SAME_APP, 0 }
|
2002-04-30 17:08:52 +00:00
|
|
|
};
|
|
|
|
GtkTargetList *target_list;
|
|
|
|
GdkDragContext *context;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
retval = TRUE;
|
|
|
|
|
|
|
|
target_list = gtk_target_list_new (row_targets, G_N_ELEMENTS (row_targets));
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
context = gtk_drag_begin (GTK_WIDGET (icon_view),
|
2002-04-30 17:08:52 +00:00
|
|
|
target_list, GDK_ACTION_MOVE,
|
|
|
|
button,
|
|
|
|
(GdkEvent *)event);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = gtk_icon_view_get_item_at_pos (icon_view,
|
|
|
|
icon_view->priv->press_start_x,
|
|
|
|
icon_view->priv->press_start_y);
|
2002-04-30 17:08:52 +00:00
|
|
|
g_assert (item != NULL);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_drag_set_icon_pixbuf (context, gtk_icon_view_get_item_icon (icon_view, item),
|
2002-04-30 17:08:52 +00:00
|
|
|
event->x - item->x,
|
|
|
|
event->y - item->y);
|
|
|
|
}
|
|
|
|
|
|
|
|
return retval;
|
|
|
|
}
|
2004-07-03 20:36:01 +00:00
|
|
|
#endif
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all_internal (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
|
|
|
gboolean dirty = FALSE;
|
|
|
|
GList *items;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode == GTK_SELECTION_NONE ||
|
|
|
|
icon_view->priv->selection_mode == GTK_SELECTION_BROWSE)
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
return FALSE;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (items = icon_view->priv->items; items; items = items->next)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = items->data;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
if (item->selected)
|
|
|
|
{
|
|
|
|
item->selected = FALSE;
|
|
|
|
dirty = TRUE;
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return dirty;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
/* GtkIconView signals */
|
2002-04-30 17:08:52 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_adjustments (GtkIconView *icon_view,
|
2002-04-30 17:08:52 +00:00
|
|
|
GtkAdjustment *hadj,
|
|
|
|
GtkAdjustment *vadj)
|
|
|
|
{
|
|
|
|
gboolean need_adjust = FALSE;
|
2002-07-29 21:11:23 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
if (hadj)
|
|
|
|
g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
|
|
|
|
else
|
|
|
|
hadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
|
|
|
|
if (vadj)
|
|
|
|
g_return_if_fail (GTK_IS_ADJUSTMENT (vadj));
|
|
|
|
else
|
|
|
|
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->hadjustment && (icon_view->priv->hadjustment != hadj))
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_handlers_disconnect_matched (icon_view->priv->hadjustment, G_SIGNAL_MATCH_DATA,
|
|
|
|
0, 0, NULL, NULL, icon_view);
|
|
|
|
g_object_unref (icon_view->priv->hadjustment);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->vadjustment && (icon_view->priv->vadjustment != vadj))
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_handlers_disconnect_matched (icon_view->priv->vadjustment, G_SIGNAL_MATCH_DATA,
|
|
|
|
0, 0, NULL, NULL, icon_view);
|
|
|
|
g_object_unref (icon_view->priv->vadjustment);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->hadjustment != hadj)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->hadjustment = hadj;
|
|
|
|
g_object_ref (icon_view->priv->hadjustment);
|
|
|
|
gtk_object_sink (GTK_OBJECT (icon_view->priv->hadjustment));
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_connect (icon_view->priv->hadjustment, "value_changed",
|
|
|
|
G_CALLBACK (gtk_icon_view_adjustment_changed),
|
|
|
|
icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
need_adjust = TRUE;
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->vadjustment != vadj)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->vadjustment = vadj;
|
|
|
|
g_object_ref (icon_view->priv->vadjustment);
|
|
|
|
gtk_object_sink (GTK_OBJECT (icon_view->priv->vadjustment));
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_connect (icon_view->priv->vadjustment, "value_changed",
|
|
|
|
G_CALLBACK (gtk_icon_view_adjustment_changed),
|
|
|
|
icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
need_adjust = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (need_adjust)
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_adjustment_changed (NULL, icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_real_select_all (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_all (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_real_unselect_all (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode == GTK_SELECTION_BROWSE)
|
2002-04-30 17:08:52 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_real_select_cursor_item (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->cursor_item != NULL)
|
|
|
|
gtk_icon_view_select_item (icon_view, icon_view->priv->cursor_item);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 23:19:46 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_icon_view_real_activate_cursor_item (GtkIconView *icon_view)
|
|
|
|
{
|
|
|
|
GtkTreePath *path;
|
|
|
|
|
|
|
|
if (!icon_view->priv->cursor_item)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
path = gtk_tree_path_new_from_indices (icon_view->priv->cursor_item->index, -1);
|
|
|
|
|
|
|
|
gtk_icon_view_item_activated (icon_view, path);
|
|
|
|
|
|
|
|
gtk_tree_path_free (path);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_real_toggle_cursor_item (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->cursor_item)
|
2002-04-30 17:08:52 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
switch (icon_view->priv->selection_mode)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
case GTK_SELECTION_NONE:
|
|
|
|
break;
|
|
|
|
case GTK_SELECTION_BROWSE:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_item (icon_view, icon_view->priv->cursor_item);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
break;
|
|
|
|
case GTK_SELECTION_SINGLE:
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->cursor_item->selected)
|
|
|
|
gtk_icon_view_unselect_item (icon_view, icon_view->priv->cursor_item);
|
2002-04-30 17:08:52 +00:00
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_item (icon_view, icon_view->priv->cursor_item);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
break;
|
|
|
|
case GTK_SELECTION_MULTIPLE:
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->cursor_item->selected = !icon_view->priv->cursor_item->selected;
|
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, icon_view->priv->cursor_item);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
break;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Internal functions */
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_adjustment_changed (GtkAdjustment *adjustment,
|
|
|
|
GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (GTK_WIDGET_REALIZED (icon_view))
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_move (icon_view->priv->bin_window,
|
|
|
|
- icon_view->priv->hadjustment->value,
|
|
|
|
- icon_view->priv->vadjustment->value);
|
2004-06-26 19:07:25 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->doing_rubberband)
|
|
|
|
gtk_icon_view_update_rubberband (GTK_WIDGET (icon_view));
|
2004-06-26 19:07:25 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_process_updates (icon_view->priv->bin_window, TRUE);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static GList *
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_layout_single_row (GtkIconView *icon_view, GList *first_item, gint *y, gint *maximum_width, gint row)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-18 03:05:24 +00:00
|
|
|
gint focus_width, focus_pad;
|
2002-04-30 17:08:52 +00:00
|
|
|
gint x, current_width, max_height, max_pixbuf_height;
|
|
|
|
GList *items, *last_item;
|
|
|
|
gint maximum_layout_width;
|
2004-06-18 05:17:01 +00:00
|
|
|
gint col;
|
2004-07-04 15:56:55 +00:00
|
|
|
gboolean rtl = gtk_widget_get_direction (GTK_WIDGET (icon_view)) == GTK_TEXT_DIR_RTL;
|
2004-06-16 00:03:31 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
x = 0;
|
2004-06-18 05:17:01 +00:00
|
|
|
col = 0;
|
2002-04-30 17:08:52 +00:00
|
|
|
max_height = 0;
|
|
|
|
max_pixbuf_height = 0;
|
|
|
|
items = first_item;
|
|
|
|
current_width = 0;
|
|
|
|
|
2004-07-18 03:05:24 +00:00
|
|
|
gtk_widget_style_get (GTK_WIDGET (icon_view),
|
|
|
|
"focus-line-width", &focus_width,
|
|
|
|
"focus-padding", &focus_pad,
|
|
|
|
NULL);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
x += ICON_VIEW_LEFT_MARGIN;
|
|
|
|
current_width += ICON_VIEW_LEFT_MARGIN + ICON_VIEW_RIGHT_MARGIN;
|
2002-04-30 17:08:52 +00:00
|
|
|
items = first_item;
|
|
|
|
|
|
|
|
while (items)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = items->data;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_calculate_item_size (icon_view, item);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
current_width += MAX (item->width, MINIMUM_ICON_ITEM_WIDTH);
|
|
|
|
|
|
|
|
/* Don't add padding to the first or last icon */
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (current_width > GTK_WIDGET (icon_view)->allocation.width &&
|
2002-04-30 17:08:52 +00:00
|
|
|
items != first_item)
|
|
|
|
break;
|
|
|
|
|
|
|
|
maximum_layout_width = MAX (item->pixbuf_width, MINIMUM_ICON_ITEM_WIDTH);
|
|
|
|
|
|
|
|
item->y = *y;
|
2004-07-04 15:56:55 +00:00
|
|
|
item->x = rtl ? GTK_WIDGET (icon_view)->allocation.width - item->width - x : x;
|
2002-04-30 17:08:52 +00:00
|
|
|
if (item->width < MINIMUM_ICON_ITEM_WIDTH) {
|
2004-06-16 00:03:31 +00:00
|
|
|
if (rtl)
|
|
|
|
item->x -= (MINIMUM_ICON_ITEM_WIDTH - item->width) / 2;
|
|
|
|
else
|
|
|
|
item->x += (MINIMUM_ICON_ITEM_WIDTH - item->width) / 2;
|
2002-04-30 17:08:52 +00:00
|
|
|
x += (MINIMUM_ICON_ITEM_WIDTH - item->width);
|
|
|
|
}
|
|
|
|
|
2004-07-18 03:39:50 +00:00
|
|
|
if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
|
|
|
if (gtk_widget_get_direction (GTK_WIDGET (icon_view)) == GTK_TEXT_DIR_RTL)
|
|
|
|
{
|
|
|
|
item->layout_x = item->x + ICON_TEXT_PADDING + focus_width + focus_pad;
|
|
|
|
item->pixbuf_x = item->x + 2 * (ICON_TEXT_PADDING + focus_width + focus_pad) + item->layout_width;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->pixbuf_x = item->x;
|
|
|
|
item->layout_x = item->x + item->pixbuf_width + ICON_TEXT_PADDING + focus_width + focus_pad;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->pixbuf_x = item->x + (item->width - item->pixbuf_width) / 2;
|
|
|
|
item->layout_x = item->x + (item->width - item->layout_width) / 2;
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
x += item->width;
|
|
|
|
|
|
|
|
max_height = MAX (max_height, item->height);
|
|
|
|
max_pixbuf_height = MAX (max_pixbuf_height, item->pixbuf_height);
|
|
|
|
|
|
|
|
if (current_width > *maximum_width)
|
|
|
|
*maximum_width = current_width;
|
|
|
|
|
2004-06-18 05:17:01 +00:00
|
|
|
item->row = row;
|
|
|
|
item->col = col;
|
|
|
|
|
|
|
|
col++;
|
2002-04-30 17:08:52 +00:00
|
|
|
items = items->next;
|
|
|
|
}
|
|
|
|
|
|
|
|
last_item = items;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
*y += max_height + ICON_VIEW_ICON_PADDING;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
/* Now go through the row again and align the icons */
|
|
|
|
for (items = first_item; items != last_item; items = items->next)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = items->data;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-18 03:39:50 +00:00
|
|
|
if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
|
|
|
item->pixbuf_y = item->y;
|
|
|
|
item->layout_y = item->y + ICON_TEXT_PADDING + focus_width + focus_pad;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->pixbuf_y = item->y + (max_pixbuf_height - item->pixbuf_height);
|
|
|
|
item->layout_y = item->pixbuf_y + item->pixbuf_height + ICON_TEXT_PADDING + focus_width + focus_pad;
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
/* Update the bounding box */
|
|
|
|
item->y = item->pixbuf_y;
|
|
|
|
|
|
|
|
/* We may want to readjust the new y coordinate. */
|
|
|
|
if (item->y + item->height > *y)
|
|
|
|
*y = item->y + item->height;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
if (rtl)
|
|
|
|
item->col = col - 1 - item->col;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return last_item;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_adjustment_upper (GtkAdjustment *adj,
|
2002-04-30 17:08:52 +00:00
|
|
|
gdouble upper)
|
|
|
|
{
|
|
|
|
if (upper != adj->upper)
|
|
|
|
{
|
2002-07-29 21:11:23 +00:00
|
|
|
gdouble min = MAX (0.0, upper - adj->page_size);
|
2002-04-30 17:08:52 +00:00
|
|
|
gboolean value_changed = FALSE;
|
|
|
|
|
|
|
|
adj->upper = upper;
|
2002-07-29 21:11:23 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
if (adj->value > min)
|
|
|
|
{
|
|
|
|
adj->value = min;
|
|
|
|
value_changed = TRUE;
|
|
|
|
}
|
|
|
|
|
2002-07-29 21:11:23 +00:00
|
|
|
gtk_adjustment_changed (adj);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
if (value_changed)
|
2002-07-29 21:11:23 +00:00
|
|
|
gtk_adjustment_value_changed (adj);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_layout (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
|
|
|
gint y = 0, maximum_width = 0;
|
|
|
|
GList *icons;
|
|
|
|
GtkWidget *widget;
|
2004-06-18 05:17:01 +00:00
|
|
|
gint row;
|
2004-07-04 20:35:35 +00:00
|
|
|
|
|
|
|
if (!VALID_MODEL_AND_COLUMNS (icon_view))
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
widget = GTK_WIDGET (icon_view);
|
|
|
|
icons = icon_view->priv->items;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
y += ICON_VIEW_TOP_MARGIN;
|
2004-06-18 05:17:01 +00:00
|
|
|
row = 0;
|
2004-06-16 00:03:31 +00:00
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
do
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
icons = gtk_icon_view_layout_single_row (icon_view, icons, &y, &maximum_width, row);
|
2004-06-18 05:17:01 +00:00
|
|
|
row++;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
while (icons != NULL);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (maximum_width != icon_view->priv->width)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->width = maximum_width;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
2004-07-04 15:56:55 +00:00
|
|
|
y += ICON_VIEW_BOTTOM_MARGIN;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (y != icon_view->priv->height)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->height = y;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_adjustment_upper (icon_view->priv->hadjustment, icon_view->priv->width);
|
|
|
|
gtk_icon_view_set_adjustment_upper (icon_view->priv->vadjustment, icon_view->priv->height);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (GTK_WIDGET_REALIZED (icon_view))
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_resize (icon_view->priv->bin_window,
|
|
|
|
MAX (icon_view->priv->width, widget->allocation.width),
|
|
|
|
MAX (icon_view->priv->height, widget->allocation.height));
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->layout_idle_id != 0)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_source_remove (icon_view->priv->layout_idle_id);
|
|
|
|
icon_view->priv->layout_idle_id = 0;
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_widget_queue_draw (GTK_WIDGET (icon_view));
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
/* Updates the pango layout and calculates the size */
|
2002-04-30 17:08:52 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_calculate_item_size (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-18 03:05:24 +00:00
|
|
|
gint focus_width, focus_pad;
|
|
|
|
gint layout_width, layout_height;
|
|
|
|
gint maximum_layout_width;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GdkPixbuf *pixbuf;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
if (item->width != -1 && item->width != -1)
|
|
|
|
return;
|
|
|
|
|
2004-07-18 03:05:24 +00:00
|
|
|
gtk_widget_style_get (GTK_WIDGET (icon_view),
|
|
|
|
"focus-line-width", &focus_width,
|
|
|
|
"focus-padding", &focus_pad,
|
|
|
|
NULL);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->pixbuf_column != -1)
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
pixbuf = gtk_icon_view_get_item_icon (icon_view, item);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
item->pixbuf_width = gdk_pixbuf_get_width (pixbuf);
|
|
|
|
item->pixbuf_height = gdk_pixbuf_get_height (pixbuf);
|
|
|
|
g_object_unref (pixbuf);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->pixbuf_width = 0;
|
|
|
|
item->pixbuf_height = 0;
|
|
|
|
}
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
maximum_layout_width = MAX (item->pixbuf_width, MINIMUM_ICON_ITEM_WIDTH);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->markup_column != 1 ||
|
|
|
|
icon_view->priv->text_column != -1)
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_update_item_text (icon_view, item);
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
pango_layout_set_alignment (icon_view->priv->layout, PANGO_ALIGN_CENTER);
|
|
|
|
pango_layout_set_width (icon_view->priv->layout, maximum_layout_width * PANGO_SCALE);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
pango_layout_get_pixel_size (icon_view->priv->layout, &layout_width, &layout_height);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
item->layout_width = layout_width;
|
|
|
|
item->layout_height = layout_height;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->layout_width = 0;
|
|
|
|
item->layout_height = 0;
|
|
|
|
}
|
2004-07-18 03:39:50 +00:00
|
|
|
|
|
|
|
if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
|
|
|
item->width = layout_width + 2 * (ICON_TEXT_PADDING + focus_width + focus_pad) + item->pixbuf_width;
|
|
|
|
item->height = MAX (layout_height + 2 * (ICON_TEXT_PADDING + focus_width + focus_pad), item->pixbuf_height);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->width = MAX (layout_width + 2 * (ICON_TEXT_PADDING + focus_width + focus_pad), item->pixbuf_width);
|
|
|
|
item->height = layout_height + 2 * (ICON_TEXT_PADDING + focus_width + focus_pad) + item->pixbuf_height;
|
|
|
|
}
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_invalidate_sizes (GtkIconView *icon_view)
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_list_foreach (icon_view->priv->items,
|
|
|
|
(GFunc)gtk_icon_view_item_invalidate_size, NULL);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_item_invalidate_size (GtkIconViewItem *item)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
|
|
|
item->width = -1;
|
|
|
|
item->height = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GdkPixbuf *
|
|
|
|
create_colorized_pixbuf (GdkPixbuf *src, GdkColor *new_color)
|
|
|
|
{
|
|
|
|
gint i, j;
|
|
|
|
gint width, height, has_alpha, src_row_stride, dst_row_stride;
|
|
|
|
gint red_value, green_value, blue_value;
|
|
|
|
guchar *target_pixels;
|
|
|
|
guchar *original_pixels;
|
|
|
|
guchar *pixsrc;
|
|
|
|
guchar *pixdest;
|
|
|
|
GdkPixbuf *dest;
|
|
|
|
|
|
|
|
red_value = new_color->red / 255.0;
|
|
|
|
green_value = new_color->green / 255.0;
|
|
|
|
blue_value = new_color->blue / 255.0;
|
|
|
|
|
|
|
|
dest = gdk_pixbuf_new (gdk_pixbuf_get_colorspace (src),
|
|
|
|
gdk_pixbuf_get_has_alpha (src),
|
|
|
|
gdk_pixbuf_get_bits_per_sample (src),
|
|
|
|
gdk_pixbuf_get_width (src),
|
|
|
|
gdk_pixbuf_get_height (src));
|
|
|
|
|
|
|
|
has_alpha = gdk_pixbuf_get_has_alpha (src);
|
|
|
|
width = gdk_pixbuf_get_width (src);
|
|
|
|
height = gdk_pixbuf_get_height (src);
|
|
|
|
src_row_stride = gdk_pixbuf_get_rowstride (src);
|
|
|
|
dst_row_stride = gdk_pixbuf_get_rowstride (dest);
|
|
|
|
target_pixels = gdk_pixbuf_get_pixels (dest);
|
|
|
|
original_pixels = gdk_pixbuf_get_pixels (src);
|
|
|
|
|
|
|
|
for (i = 0; i < height; i++) {
|
|
|
|
pixdest = target_pixels + i*dst_row_stride;
|
|
|
|
pixsrc = original_pixels + i*src_row_stride;
|
|
|
|
for (j = 0; j < width; j++) {
|
|
|
|
*pixdest++ = (*pixsrc++ * red_value) >> 8;
|
|
|
|
*pixdest++ = (*pixsrc++ * green_value) >> 8;
|
|
|
|
*pixdest++ = (*pixsrc++ * blue_value) >> 8;
|
|
|
|
if (has_alpha) {
|
|
|
|
*pixdest++ = *pixsrc++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return dest;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_paint_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkRectangle *area)
|
|
|
|
{
|
2004-07-18 03:05:24 +00:00
|
|
|
gint focus_width, focus_pad;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GdkPixbuf *pixbuf, *tmp;
|
2002-04-30 17:08:52 +00:00
|
|
|
GtkStateType state;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!VALID_MODEL_AND_COLUMNS (icon_view))
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
return;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-18 03:05:24 +00:00
|
|
|
gtk_widget_style_get (GTK_WIDGET (icon_view),
|
|
|
|
"focus-line-width", &focus_width,
|
|
|
|
"focus-padding", &focus_pad,
|
|
|
|
NULL);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (GTK_WIDGET_HAS_FOCUS (icon_view))
|
2002-04-30 17:08:52 +00:00
|
|
|
state = GTK_STATE_SELECTED;
|
|
|
|
else
|
|
|
|
state = GTK_STATE_ACTIVE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->pixbuf_column != -1)
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
tmp = gtk_icon_view_get_item_icon (icon_view, item);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
if (item->selected)
|
|
|
|
{
|
|
|
|
pixbuf = create_colorized_pixbuf (tmp,
|
2004-07-04 15:56:55 +00:00
|
|
|
>K_WIDGET (icon_view)->style->base[state]);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
g_object_unref (tmp);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
pixbuf = tmp;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_draw_pixbuf (icon_view->priv->bin_window, NULL, pixbuf,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
0, 0,
|
|
|
|
item->pixbuf_x, item->pixbuf_y,
|
|
|
|
item->pixbuf_width, item->pixbuf_height,
|
|
|
|
GDK_RGB_DITHER_NORMAL,
|
|
|
|
item->pixbuf_width, item->pixbuf_height);
|
|
|
|
g_object_unref (pixbuf);
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->text_column != -1)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
if (item->selected)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_draw_rectangle (icon_view->priv->bin_window,
|
|
|
|
GTK_WIDGET (icon_view)->style->base_gc[state],
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
TRUE,
|
|
|
|
item->layout_x - ICON_TEXT_PADDING,
|
|
|
|
item->layout_y - ICON_TEXT_PADDING,
|
|
|
|
item->layout_width + 2 * ICON_TEXT_PADDING,
|
|
|
|
item->layout_height + 2 * ICON_TEXT_PADDING);
|
|
|
|
}
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_update_item_text (icon_view, item);
|
|
|
|
gtk_paint_layout (GTK_WIDGET (icon_view)->style,
|
|
|
|
icon_view->priv->bin_window,
|
2004-07-03 10:04:14 +00:00
|
|
|
item->selected ? state : GTK_STATE_NORMAL,
|
2004-07-04 15:56:55 +00:00
|
|
|
TRUE, area, GTK_WIDGET (icon_view), "icon_view",
|
2004-07-03 10:04:14 +00:00
|
|
|
item->layout_x - ((item->width - item->layout_width) / 2) - (MAX (item->pixbuf_width, MINIMUM_ICON_ITEM_WIDTH) - item->width) / 2,
|
|
|
|
item->layout_y,
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->layout);
|
2004-07-03 10:04:14 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (GTK_WIDGET_HAS_FOCUS (icon_view) &&
|
|
|
|
item == icon_view->priv->cursor_item)
|
|
|
|
gtk_paint_focus (GTK_WIDGET (icon_view)->style,
|
|
|
|
icon_view->priv->bin_window,
|
2004-07-18 03:05:24 +00:00
|
|
|
GTK_STATE_NORMAL,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
area,
|
2004-07-04 15:56:55 +00:00
|
|
|
GTK_WIDGET (icon_view),
|
|
|
|
"icon_view",
|
2004-07-18 03:05:24 +00:00
|
|
|
item->layout_x - ICON_TEXT_PADDING - focus_width - focus_pad,
|
|
|
|
item->layout_y - ICON_TEXT_PADDING - focus_width - focus_pad,
|
|
|
|
item->layout_width + 2 * (ICON_TEXT_PADDING + focus_width + focus_pad),
|
|
|
|
item->layout_height + 2 * (ICON_TEXT_PADDING + focus_width + focus_pad));
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
2003-07-03 13:10:41 +00:00
|
|
|
static guint32
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_gdk_color_to_rgb (const GdkColor *color)
|
2003-07-03 13:10:41 +00:00
|
|
|
{
|
|
|
|
guint32 result;
|
|
|
|
result = (0xff0000 | (color->red & 0xff00));
|
|
|
|
result <<= 8;
|
|
|
|
result |= ((color->green & 0xff00) | (color->blue >> 8));
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2002-04-30 17:08:52 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_paint_rubberband (GtkIconView *icon_view,
|
2002-04-30 17:08:52 +00:00
|
|
|
GdkRectangle *area)
|
|
|
|
{
|
|
|
|
GdkRectangle rect;
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
GdkGC *gc;
|
|
|
|
GdkRectangle rubber_rect;
|
2003-07-03 13:10:41 +00:00
|
|
|
GdkColor *fill_color_gdk;
|
|
|
|
guint fill_color;
|
|
|
|
guchar fill_color_alpha;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
rubber_rect.x = MIN (icon_view->priv->rubberband_x1, icon_view->priv->rubberband_x2);
|
|
|
|
rubber_rect.y = MIN (icon_view->priv->rubberband_y1, icon_view->priv->rubberband_y2);
|
|
|
|
rubber_rect.width = ABS (icon_view->priv->rubberband_x1 - icon_view->priv->rubberband_x2) + 1;
|
|
|
|
rubber_rect.height = ABS (icon_view->priv->rubberband_y1 - icon_view->priv->rubberband_y2) + 1;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
if (!gdk_rectangle_intersect (&rubber_rect, area, &rect))
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_widget_style_get (GTK_WIDGET (icon_view),
|
2003-07-03 13:10:41 +00:00
|
|
|
"selection_box_color", &fill_color_gdk,
|
|
|
|
"selection_box_alpha", &fill_color_alpha,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
if (!fill_color_gdk) {
|
2004-07-04 15:56:55 +00:00
|
|
|
fill_color_gdk = gdk_color_copy (>K_WIDGET (icon_view)->style->base[GTK_STATE_SELECTED]);
|
2003-07-03 13:10:41 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
fill_color = gtk_gdk_color_to_rgb (fill_color_gdk) << 8 | fill_color_alpha;
|
2003-07-03 13:10:41 +00:00
|
|
|
|
2004-07-27 21:58:09 +00:00
|
|
|
if (!gdk_draw_rectangle_alpha_libgtk_only (icon_view->priv->bin_window,
|
|
|
|
rect.x, rect.y, rect.width, rect.height,
|
|
|
|
fill_color_gdk,
|
|
|
|
fill_color_alpha << 8 | fill_color_alpha))
|
|
|
|
{
|
|
|
|
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, rect.width, rect.height);
|
|
|
|
gdk_pixbuf_fill (pixbuf, fill_color);
|
|
|
|
|
|
|
|
gdk_draw_pixbuf (icon_view->priv->bin_window, NULL, pixbuf,
|
|
|
|
0, 0,
|
|
|
|
rect.x,rect.y,
|
|
|
|
rect.width, rect.height,
|
|
|
|
GDK_RGB_DITHER_NONE,
|
|
|
|
0, 0);
|
|
|
|
g_object_unref (pixbuf);
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gc = gdk_gc_new (icon_view->priv->bin_window);
|
2003-07-03 13:10:41 +00:00
|
|
|
gdk_gc_set_rgb_fg_color (gc, fill_color_gdk);
|
2002-04-30 17:08:52 +00:00
|
|
|
gdk_gc_set_clip_rectangle (gc, &rect);
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_draw_rectangle (icon_view->priv->bin_window,
|
2002-04-30 17:08:52 +00:00
|
|
|
gc, FALSE,
|
|
|
|
rubber_rect.x, rubber_rect.y,
|
|
|
|
rubber_rect.width - 1, rubber_rect.height - 1);
|
2003-07-03 13:10:41 +00:00
|
|
|
gdk_color_free (fill_color_gdk);
|
2002-04-30 17:08:52 +00:00
|
|
|
g_object_unref (gc);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
|
|
|
GdkRectangle rect;
|
|
|
|
|
|
|
|
rect.x = item->x;
|
|
|
|
rect.y = item->y;
|
|
|
|
rect.width = item->width;
|
|
|
|
rect.height = item->height;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->bin_window)
|
|
|
|
gdk_window_invalidate_rect (icon_view->priv->bin_window, &rect, TRUE);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
layout_callback (gpointer user_data)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (user_data);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->layout_idle_id = 0;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_layout (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_layout (GtkIconView *icon_view)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->layout_idle_id != 0)
|
2002-04-30 17:08:52 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->layout_idle_id = g_idle_add (layout_callback, icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_cursor_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->cursor_item == item)
|
2002-04-30 17:08:52 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->cursor_item != NULL)
|
|
|
|
gtk_icon_view_queue_draw_item (icon_view, icon_view->priv->cursor_item);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->cursor_item = item;
|
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
static GtkIconViewItem *
|
|
|
|
gtk_icon_view_item_new (void)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = g_new0 (GtkIconViewItem, 1);
|
2002-07-29 21:11:23 +00:00
|
|
|
|
|
|
|
item->width = -1;
|
|
|
|
item->height = -1;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_item_free (GtkIconViewItem *item)
|
2002-07-29 21:11:23 +00:00
|
|
|
{
|
|
|
|
g_return_if_fail (item != NULL);
|
|
|
|
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
g_free (item);
|
2002-07-29 21:11:23 +00:00
|
|
|
}
|
|
|
|
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_update_item_text (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gboolean iters_persist;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreePath *path;
|
|
|
|
gchar *text;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
iters_persist = gtk_tree_model_get_flags (icon_view->priv->model) & GTK_TREE_MODEL_ITERS_PERSIST;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
if (!iters_persist)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
path = gtk_tree_path_new_from_indices (item->index, -1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_tree_model_get_iter (icon_view->priv->model, &iter, path);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gtk_tree_path_free (path);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
else
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
iter = item->iter;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->markup_column != -1)
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_tree_model_get (icon_view->priv->model, &iter,
|
|
|
|
icon_view->priv->markup_column, &text,
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
-1);
|
2004-07-04 15:56:55 +00:00
|
|
|
pango_layout_set_markup (icon_view->priv->layout, text, -1);
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_tree_model_get (icon_view->priv->model, &iter,
|
|
|
|
icon_view->priv->text_column, &text,
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
-1);
|
2004-07-04 15:56:55 +00:00
|
|
|
pango_layout_set_text (icon_view->priv->layout, text, -1);
|
Add markup column support.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_calculate_item_size),
(egg_icon_list_paint_item), (egg_icon_list_update_item_text),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model):
Add markup column support.
2004-07-02 13:20:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
g_free (text);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
static GdkPixbuf *
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_item_icon (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gboolean iters_persist;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreePath *path;
|
|
|
|
GdkPixbuf *pixbuf;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
g_return_val_if_fail (item != NULL, NULL);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
iters_persist = gtk_tree_model_get_flags (icon_view->priv->model) & GTK_TREE_MODEL_ITERS_PERSIST;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
if (!iters_persist)
|
|
|
|
{
|
|
|
|
path = gtk_tree_path_new_from_indices (item->index, -1);
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_tree_model_get_iter (icon_view->priv->model, &iter, path);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gtk_tree_path_free (path);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
iter = item->iter;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_tree_model_get (icon_view->priv->model, &iter,
|
|
|
|
icon_view->priv->pixbuf_column, &pixbuf,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
-1);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
return pixbuf;
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
static GtkIconViewItem *
|
|
|
|
gtk_icon_view_get_item_at_pos (GtkIconView *icon_view,
|
2002-04-30 17:08:52 +00:00
|
|
|
gint x,
|
|
|
|
gint y)
|
|
|
|
{
|
|
|
|
GList *items;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (items = icon_view->priv->items; items; items = items->next)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = items->data;
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
if (x > item->x && x < item->x + item->width &&
|
|
|
|
y > item->y && y < item->y + item->height)
|
|
|
|
{
|
2004-06-16 00:03:31 +00:00
|
|
|
gint layout_x = item->x + (item->width - item->layout_width) / 2;
|
2002-04-30 17:08:52 +00:00
|
|
|
/* Check if the mouse is inside the icon or the label */
|
|
|
|
if ((x > item->pixbuf_x && x < item->pixbuf_x + item->pixbuf_width &&
|
|
|
|
y > item->pixbuf_y && y < item->pixbuf_y + item->pixbuf_height) ||
|
|
|
|
(x > layout_x - ICON_TEXT_PADDING &&
|
|
|
|
x < layout_x + item->layout_width + ICON_TEXT_PADDING * 2 &&
|
|
|
|
y > item->layout_y - ICON_TEXT_PADDING
|
|
|
|
&& y < item->layout_y + item->layout_height + ICON_TEXT_PADDING * 2))
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
2002-04-30 17:08:52 +00:00
|
|
|
g_return_if_fail (item != NULL);
|
|
|
|
|
|
|
|
if (item->selected)
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode == GTK_SELECTION_NONE)
|
2002-04-30 17:08:52 +00:00
|
|
|
return;
|
2004-07-04 15:56:55 +00:00
|
|
|
else if (icon_view->priv->selection_mode != GTK_SELECTION_MULTIPLE)
|
|
|
|
gtk_icon_view_unselect_all_internal (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
|
|
|
item->selected = TRUE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
2002-04-30 17:08:52 +00:00
|
|
|
g_return_if_fail (item != NULL);
|
|
|
|
|
|
|
|
if (!item->selected)
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode == GTK_SELECTION_NONE ||
|
|
|
|
icon_view->priv->selection_mode == GTK_SELECTION_BROWSE)
|
2002-04-30 17:08:52 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
item->selected = FALSE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
verify_items (GtkIconView *icon_view)
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
{
|
|
|
|
GList *items;
|
|
|
|
int i = 0;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (items = icon_view->priv->items; items; items = items->next)
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = items->data;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
|
|
|
if (item->index != i)
|
|
|
|
g_error ("List item does not match its index: item index %d and list index %d\n", item->index, i);
|
|
|
|
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_row_changed (GtkTreeModel *model,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkTreePath *path,
|
|
|
|
GtkTreeIter *iter,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint index;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (data);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
index = gtk_tree_path_get_indices(path)[0];
|
2004-07-04 15:56:55 +00:00
|
|
|
item = g_list_nth (icon_view->priv->items, index)->data;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_item_invalidate_size (item);
|
|
|
|
gtk_icon_view_queue_layout (icon_view);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
verify_items (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_row_inserted (GtkTreeModel *model,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkTreePath *path,
|
|
|
|
GtkTreeIter *iter,
|
|
|
|
gpointer data)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint length, index;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gboolean iters_persist;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
GList *list;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (data);
|
|
|
|
iters_persist = gtk_tree_model_get_flags (icon_view->priv->model) & GTK_TREE_MODEL_ITERS_PERSIST;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
length = gtk_tree_model_iter_n_children (model, NULL);
|
|
|
|
index = gtk_tree_path_get_indices(path)[0];
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = gtk_icon_view_item_new ();
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
if (iters_persist)
|
|
|
|
item->iter = *iter;
|
|
|
|
|
|
|
|
item->index = index;
|
|
|
|
|
|
|
|
/* FIXME: We can be more efficient here,
|
|
|
|
we can store a tail pointer and use that when
|
|
|
|
appending (which is a rather common operation)
|
|
|
|
*/
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->items = g_list_insert (icon_view->priv->items,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
item, index);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
list = g_list_nth (icon_view->priv->items, index + 1);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
for (; list; list = list->next)
|
|
|
|
{
|
|
|
|
item = list->data;
|
|
|
|
|
|
|
|
item->index++;
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
verify_items (icon_view);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_row_deleted (GtkTreeModel *model,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkTreePath *path,
|
|
|
|
gpointer data)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
gint index;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
|
|
|
GtkIconViewItem *item;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
GList *list, *next;
|
2004-07-03 20:36:01 +00:00
|
|
|
gboolean emit = FALSE;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (data);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
index = gtk_tree_path_get_indices(path)[0];
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
list = g_list_nth (icon_view->priv->items, index);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
item = list->data;
|
2004-07-03 20:36:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (item == icon_view->priv->anchor_item)
|
|
|
|
icon_view->priv->anchor_item = NULL;
|
2004-07-03 20:36:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (item == icon_view->priv->cursor_item)
|
|
|
|
icon_view->priv->cursor_item = NULL;
|
2004-07-03 20:36:01 +00:00
|
|
|
|
|
|
|
if (item->selected)
|
|
|
|
emit = TRUE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_item_free (item);
|
2004-07-03 20:36:01 +00:00
|
|
|
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
for (next = list->next; next; next = next->next)
|
|
|
|
{
|
|
|
|
item = next->data;
|
|
|
|
|
|
|
|
item->index--;
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->items = g_list_delete_link (icon_view->priv->items, list);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_layout (icon_view);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
verify_items (icon_view);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
2004-07-03 20:36:01 +00:00
|
|
|
if (emit)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_rows_reordered (GtkTreeModel *model,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GtkTreePath *parent,
|
|
|
|
GtkTreeIter *iter,
|
|
|
|
gint *new_order,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int length;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconView *icon_view;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
GList *items = NULL, *list;
|
|
|
|
gint *inverted_order;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem **item_array;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view = GTK_ICON_VIEW (data);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
length = gtk_tree_model_iter_n_children (model, NULL);
|
|
|
|
inverted_order = g_new (gint, length);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
/* Invert the array */
|
|
|
|
for (i = 0; i < length; i++)
|
|
|
|
inverted_order[new_order[i]] = i;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item_array = g_new (GtkIconViewItem *, length);
|
|
|
|
for (i = 0, list = icon_view->priv->items; list != NULL; list = list->next, i++)
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
item_array[inverted_order[i]] = list->data;
|
|
|
|
|
|
|
|
g_free (inverted_order);
|
|
|
|
for (i = 0; i < length; i++)
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
{
|
|
|
|
item_array[i]->index = i;
|
|
|
|
items = g_list_prepend (items, item_array[i]);
|
|
|
|
}
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
g_free (item_array);
|
2004-07-04 15:56:55 +00:00
|
|
|
g_list_free (icon_view->priv->items);
|
|
|
|
icon_view->priv->items = g_list_reverse (items);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
verify_items (icon_view);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_build_items (GtkIconView *icon_view)
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
{
|
|
|
|
GtkTreeIter iter;
|
|
|
|
int i;
|
|
|
|
gboolean iters_persist;
|
|
|
|
GList *items = NULL;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
iters_persist = gtk_tree_model_get_flags (icon_view->priv->model) & GTK_TREE_MODEL_ITERS_PERSIST;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!gtk_tree_model_get_iter_first (icon_view->priv->model,
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
&iter))
|
|
|
|
return;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
|
|
|
|
do
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = gtk_icon_view_item_new ();
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
|
|
|
if (iters_persist)
|
|
|
|
item->iter = iter;
|
|
|
|
|
|
|
|
item->index = i;
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
|
|
|
items = g_list_prepend (items, item);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
} while (gtk_tree_model_iter_next (icon_view->priv->model, &iter));
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->items = g_list_reverse (items);
|
2002-04-30 17:08:52 +00:00
|
|
|
}
|
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_add_move_binding (GtkBindingSet *binding_set,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
guint keyval,
|
|
|
|
guint modmask,
|
|
|
|
GtkMovementStep step,
|
|
|
|
gint count)
|
2002-04-30 17:08:52 +00:00
|
|
|
{
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set, keyval, modmask,
|
|
|
|
"move_cursor", 2,
|
|
|
|
G_TYPE_ENUM, step,
|
|
|
|
G_TYPE_INT, count);
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set, keyval, GDK_SHIFT_MASK,
|
|
|
|
"move_cursor", 2,
|
|
|
|
G_TYPE_ENUM, step,
|
|
|
|
G_TYPE_INT, count);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
if ((modmask & GDK_CONTROL_MASK) == GDK_CONTROL_MASK)
|
|
|
|
return;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set, keyval, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
|
|
|
|
"move_cursor", 2,
|
|
|
|
G_TYPE_ENUM, step,
|
|
|
|
G_TYPE_INT, count);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set, keyval, GDK_CONTROL_MASK,
|
|
|
|
"move_cursor", 2,
|
|
|
|
G_TYPE_ENUM, step,
|
|
|
|
G_TYPE_INT, count);
|
|
|
|
}
|
2002-04-30 17:08:52 +00:00
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_real_move_cursor (GtkIconView *icon_view,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkMovementStep step,
|
|
|
|
gint count)
|
|
|
|
{
|
|
|
|
GdkModifierType state;
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_ICON_VIEW (icon_view), FALSE);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
g_return_val_if_fail (step == GTK_MOVEMENT_LOGICAL_POSITIONS ||
|
|
|
|
step == GTK_MOVEMENT_VISUAL_POSITIONS ||
|
|
|
|
step == GTK_MOVEMENT_DISPLAY_LINES ||
|
|
|
|
step == GTK_MOVEMENT_PAGES ||
|
|
|
|
step == GTK_MOVEMENT_BUFFER_ENDS, FALSE);
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (icon_view)))
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
return FALSE;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_widget_grab_focus (GTK_WIDGET (icon_view));
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
if (gtk_get_current_event_state (&state))
|
|
|
|
{
|
|
|
|
if ((state & GDK_CONTROL_MASK) == GDK_CONTROL_MASK)
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->ctrl_pressed = TRUE;
|
2004-06-18 05:17:01 +00:00
|
|
|
if ((state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->shift_pressed = TRUE;
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
|
|
|
/* else we assume not pressed */
|
|
|
|
|
|
|
|
switch (step)
|
|
|
|
{
|
|
|
|
case GTK_MOVEMENT_LOGICAL_POSITIONS:
|
|
|
|
case GTK_MOVEMENT_VISUAL_POSITIONS:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_move_cursor_left_right (icon_view, count);
|
2004-06-18 05:17:01 +00:00
|
|
|
break;
|
|
|
|
case GTK_MOVEMENT_DISPLAY_LINES:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_move_cursor_up_down (icon_view, count);
|
2004-06-18 05:17:01 +00:00
|
|
|
break;
|
|
|
|
case GTK_MOVEMENT_PAGES:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_move_cursor_page_up_down (icon_view, count);
|
2004-06-18 05:17:01 +00:00
|
|
|
break;
|
|
|
|
case GTK_MOVEMENT_BUFFER_ENDS:
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_move_cursor_start_end (icon_view, count);
|
2004-06-18 05:17:01 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
g_assert_not_reached ();
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->ctrl_pressed = FALSE;
|
|
|
|
icon_view->priv->shift_pressed = FALSE;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
static GtkIconViewItem *
|
|
|
|
find_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *current,
|
2004-06-18 05:17:01 +00:00
|
|
|
gint row_ofs,
|
|
|
|
gint col_ofs)
|
|
|
|
{
|
|
|
|
gint row, col;
|
|
|
|
GList *items;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
/* FIXME: this could be more efficient
|
|
|
|
*/
|
|
|
|
row = current->row + row_ofs;
|
|
|
|
col = current->col + col_ofs;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (items = icon_view->priv->items; items; items = items->next)
|
2004-06-18 05:17:01 +00:00
|
|
|
{
|
|
|
|
item = items->data;
|
|
|
|
if (item->row == row && item->col == col)
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
static GtkIconViewItem *
|
|
|
|
find_item_page_up_down (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *current,
|
2004-06-18 05:17:01 +00:00
|
|
|
gint count)
|
|
|
|
{
|
|
|
|
GList *item, *next;
|
|
|
|
gint y, col;
|
|
|
|
|
|
|
|
col = current->col;
|
2004-07-04 15:56:55 +00:00
|
|
|
y = current->y + count * icon_view->priv->vadjustment->page_size;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = g_list_find (icon_view->priv->items, current);
|
2004-06-18 05:17:01 +00:00
|
|
|
if (count > 0)
|
|
|
|
{
|
|
|
|
while (item)
|
|
|
|
{
|
|
|
|
for (next = item->next; next; next = next->next)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (((GtkIconViewItem *)next->data)->col == col)
|
2004-06-18 05:17:01 +00:00
|
|
|
break;
|
|
|
|
}
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!next || ((GtkIconViewItem *)next->data)->y > y)
|
2004-06-18 05:17:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
item = next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
while (item)
|
|
|
|
{
|
|
|
|
for (next = item->prev; next; next = next->prev)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (((GtkIconViewItem *)next->data)->col == col)
|
2004-06-18 05:17:01 +00:00
|
|
|
break;
|
|
|
|
}
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!next || ((GtkIconViewItem *)next->data)->y < y)
|
2004-06-18 05:17:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
item = next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item)
|
|
|
|
return item->data;
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
static gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_all_between (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *anchor,
|
|
|
|
GtkIconViewItem *cursor)
|
2004-06-18 05:17:01 +00:00
|
|
|
{
|
|
|
|
GList *items;
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
2004-06-18 05:17:01 +00:00
|
|
|
gint row1, row2, col1, col2;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
gboolean dirty = FALSE;
|
|
|
|
|
2004-06-18 05:17:01 +00:00
|
|
|
if (anchor->row < cursor->row)
|
|
|
|
{
|
|
|
|
row1 = anchor->row;
|
|
|
|
row2 = cursor->row;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
row1 = cursor->row;
|
|
|
|
row2 = anchor->row;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (anchor->col < cursor->col)
|
|
|
|
{
|
|
|
|
col1 = anchor->col;
|
|
|
|
col2 = cursor->col;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
col1 = cursor->col;
|
|
|
|
col2 = anchor->col;
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (items = icon_view->priv->items; items; items = items->next)
|
2004-06-18 05:17:01 +00:00
|
|
|
{
|
|
|
|
item = items->data;
|
|
|
|
|
|
|
|
if (row1 <= item->row && item->row <= row2 &&
|
|
|
|
col1 <= item->col && item->col <= col2)
|
|
|
|
{
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
if (!item->selected)
|
|
|
|
dirty = TRUE;
|
|
|
|
|
2004-06-18 05:17:01 +00:00
|
|
|
item->selected = TRUE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
return dirty;
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_move_cursor_up_down (GtkIconView *icon_view,
|
2004-06-18 05:17:01 +00:00
|
|
|
gint count)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
gboolean dirty = FALSE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!GTK_WIDGET_HAS_FOCUS (icon_view))
|
2004-06-18 05:17:01 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->cursor_item)
|
2004-06-18 05:17:01 +00:00
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
if (count > 0)
|
2004-07-04 15:56:55 +00:00
|
|
|
list = icon_view->priv->items;
|
2004-06-18 05:17:01 +00:00
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
list = g_list_last (icon_view->priv->items);
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
item = list->data;
|
|
|
|
}
|
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
item = find_item (icon_view,
|
|
|
|
icon_view->priv->cursor_item,
|
2004-06-18 05:17:01 +00:00
|
|
|
count, 0);
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->ctrl_pressed ||
|
|
|
|
!icon_view->priv->shift_pressed ||
|
|
|
|
!icon_view->priv->anchor_item ||
|
|
|
|
icon_view->priv->selection_mode != GTK_SELECTION_MULTIPLE)
|
|
|
|
icon_view->priv->anchor_item = item;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_cursor_item (icon_view, item);
|
2004-06-21 03:41:04 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->ctrl_pressed &&
|
|
|
|
icon_view->priv->selection_mode != GTK_SELECTION_NONE)
|
2004-06-21 03:41:04 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all_internal (icon_view);
|
|
|
|
dirty = gtk_icon_view_select_all_between (icon_view,
|
|
|
|
icon_view->priv->anchor_item,
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
item);
|
2004-06-21 03:41:04 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_scroll_to_item (icon_view, item);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
|
|
|
if (dirty)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_move_cursor_page_up_down (GtkIconView *icon_view,
|
2004-06-18 05:17:01 +00:00
|
|
|
gint count)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
gboolean dirty = FALSE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!GTK_WIDGET_HAS_FOCUS (icon_view))
|
2004-06-18 05:17:01 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->cursor_item)
|
2004-06-18 05:17:01 +00:00
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
if (count > 0)
|
2004-07-04 15:56:55 +00:00
|
|
|
list = icon_view->priv->items;
|
2004-06-18 05:17:01 +00:00
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
list = g_list_last (icon_view->priv->items);
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
item = list->data;
|
|
|
|
}
|
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
item = find_item_page_up_down (icon_view,
|
|
|
|
icon_view->priv->cursor_item,
|
2004-06-18 05:17:01 +00:00
|
|
|
count);
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->ctrl_pressed ||
|
|
|
|
!icon_view->priv->shift_pressed ||
|
|
|
|
!icon_view->priv->anchor_item ||
|
|
|
|
icon_view->priv->selection_mode != GTK_SELECTION_MULTIPLE)
|
|
|
|
icon_view->priv->anchor_item = item;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_cursor_item (icon_view, item);
|
2004-06-21 03:41:04 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->ctrl_pressed &&
|
|
|
|
icon_view->priv->selection_mode != GTK_SELECTION_NONE)
|
2004-06-21 03:41:04 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all_internal (icon_view);
|
|
|
|
dirty = gtk_icon_view_select_all_between (icon_view,
|
|
|
|
icon_view->priv->anchor_item,
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
item);
|
2004-06-21 03:41:04 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_scroll_to_item (icon_view, item);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
|
|
|
if (dirty)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_move_cursor_left_right (GtkIconView *icon_view,
|
2004-06-18 05:17:01 +00:00
|
|
|
gint count)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
gboolean dirty = FALSE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!GTK_WIDGET_HAS_FOCUS (icon_view))
|
2004-06-18 05:17:01 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->cursor_item)
|
2004-06-18 05:17:01 +00:00
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
if (count > 0)
|
2004-07-04 15:56:55 +00:00
|
|
|
list = icon_view->priv->items;
|
2004-06-18 05:17:01 +00:00
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
list = g_list_last (icon_view->priv->items);
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
item = list->data;
|
|
|
|
}
|
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
item = find_item (icon_view,
|
|
|
|
icon_view->priv->cursor_item,
|
2004-06-18 05:17:01 +00:00
|
|
|
0, count);
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->ctrl_pressed ||
|
|
|
|
!icon_view->priv->shift_pressed ||
|
|
|
|
!icon_view->priv->anchor_item ||
|
|
|
|
icon_view->priv->selection_mode != GTK_SELECTION_MULTIPLE)
|
|
|
|
icon_view->priv->anchor_item = item;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_cursor_item (icon_view, item);
|
2004-06-21 03:41:04 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->ctrl_pressed &&
|
|
|
|
icon_view->priv->selection_mode != GTK_SELECTION_NONE)
|
2004-06-21 03:41:04 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all_internal (icon_view);
|
|
|
|
dirty = gtk_icon_view_select_all_between (icon_view,
|
|
|
|
icon_view->priv->anchor_item,
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
item);
|
2004-06-21 03:41:04 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_scroll_to_item (icon_view, item);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
|
|
|
if (dirty)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view,
|
2004-06-18 05:17:01 +00:00
|
|
|
gint count)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
2004-06-18 05:17:01 +00:00
|
|
|
GList *list;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
gboolean dirty = FALSE;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!GTK_WIDGET_HAS_FOCUS (icon_view))
|
2004-06-18 05:17:01 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (count < 0)
|
2004-07-04 15:56:55 +00:00
|
|
|
list = icon_view->priv->items;
|
2004-06-18 05:17:01 +00:00
|
|
|
else
|
2004-07-04 15:56:55 +00:00
|
|
|
list = g_list_last (icon_view->priv->items);
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
item = list->data;
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->ctrl_pressed ||
|
|
|
|
!icon_view->priv->shift_pressed ||
|
|
|
|
!icon_view->priv->anchor_item ||
|
|
|
|
icon_view->priv->selection_mode != GTK_SELECTION_MULTIPLE)
|
|
|
|
icon_view->priv->anchor_item = item;
|
2004-06-18 05:17:01 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_cursor_item (icon_view, item);
|
2004-06-21 03:41:04 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (!icon_view->priv->ctrl_pressed &&
|
|
|
|
icon_view->priv->selection_mode != GTK_SELECTION_NONE)
|
2004-06-21 03:41:04 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all (icon_view);
|
|
|
|
dirty = gtk_icon_view_select_all_between (icon_view,
|
|
|
|
icon_view->priv->anchor_item,
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
item);
|
2004-06-21 03:41:04 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_scroll_to_item (icon_view, item);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
|
|
|
if (dirty)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_scroll_to_item (GtkIconView *icon_view,
|
|
|
|
GtkIconViewItem *item)
|
2004-06-18 05:17:01 +00:00
|
|
|
{
|
|
|
|
gint y, height;
|
|
|
|
gdouble value;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gdk_window_get_geometry (icon_view->priv->bin_window, NULL, &y, NULL, &height, NULL);
|
2004-06-18 05:17:01 +00:00
|
|
|
|
|
|
|
if (y + item->y < 0)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
value = icon_view->priv->vadjustment->value + y + item->y;
|
|
|
|
gtk_adjustment_set_value (icon_view->priv->vadjustment, value);
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
2004-07-04 15:56:55 +00:00
|
|
|
else if (y + item->y + item->height > GTK_WIDGET (icon_view)->allocation.height)
|
2004-06-18 05:17:01 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
value = icon_view->priv->vadjustment->value + y + item->y + item->height
|
|
|
|
- GTK_WIDGET (icon_view)->allocation.height;
|
|
|
|
gtk_adjustment_set_value (icon_view->priv->vadjustment, value);
|
2004-06-18 05:17:01 +00:00
|
|
|
}
|
|
|
|
}
|
Update icon list to use the tree model instead.
2004-07-02 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_class_init),
(egg_icon_list_init), (egg_icon_list_destroy),
(egg_icon_list_finalize), (egg_icon_list_set_property),
(egg_icon_list_get_property), (egg_icon_list_button_press),
(egg_icon_list_select_first_matching_item),
(egg_icon_list_maybe_begin_dragging_items),
(egg_icon_list_real_toggle_cursor_item),
(egg_icon_list_calculate_item_size),
(egg_icon_list_invalidate_sizes), (egg_icon_list_paint_item),
(egg_icon_list_item_new), (egg_icon_list_item_unref),
(egg_icon_list_get_item_text), (egg_icon_list_get_item_icon),
(egg_icon_list_get_item_at_pos), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated), (egg_icon_list_get_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_build_items), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_set_pixbuf_column):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (fill_model), (create_model),
(foreach_selected_print), (item_removed), (remove_selected),
(item_cb), (do_popup_menu), (main):
* libegg/util/eggmarshalers.list:
Update icon list to use the tree model instead.
2004-07-02 12:04:49 +00:00
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
/* Public API */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_new:
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Creates a new #GtkIconView widget
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Return value: A newly created #GtkIconView widget
|
2004-07-13 05:15:49 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
**/
|
|
|
|
GtkWidget *
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_new (void)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
return g_object_new (GTK_TYPE_ICON_VIEW, NULL);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_new_with_model:
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @model: The model.
|
|
|
|
*
|
2004-07-13 05:15:49 +00:00
|
|
|
* Creates a new #GtkIconView widget with the model @model.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Return value: A newly created #GtkIconView widget.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
GtkWidget *
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_new_with_model (GtkTreeModel *model)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
return g_object_new (GTK_TYPE_ICON_VIEW, "model", model, NULL);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_get_path_at_pos:
|
|
|
|
* @icon_view: A #GtkIconView.
|
2004-07-13 05:15:49 +00:00
|
|
|
* @x: The x position to be identified
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @y: The y position to be identified
|
|
|
|
*
|
|
|
|
* Finds the path at the point (@x, @y), relative to widget coordinates.
|
|
|
|
*
|
|
|
|
* Return value: The #GtkTreePath corresponding to the icon or %NULL
|
2004-07-13 05:15:49 +00:00
|
|
|
* if no icon exists at that position.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
GtkTreePath *
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_path_at_pos (GtkIconView *icon_view,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gint x,
|
|
|
|
gint y)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkTreePath *path;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = gtk_icon_view_get_item_at_pos (icon_view, x, y);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
if (!item)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
path = gtk_tree_path_new_from_indices (item->index, -1);
|
|
|
|
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_selected_foreach:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @func: The funcion to call for each selected icon.
|
|
|
|
* @data: User data to pass to the function.
|
|
|
|
*
|
2004-07-13 05:15:49 +00:00
|
|
|
* Calls a function for each selected icon. Note that the model or
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* selection cannot be modified from within this function.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_selected_foreach (GtkIconView *icon_view,
|
|
|
|
GtkIconViewForeachFunc func,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (list = icon_view->priv->items; list; list = list->next)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = list->data;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkTreePath *path = gtk_tree_path_new_from_indices (item->index, -1);
|
|
|
|
|
|
|
|
if (item->selected)
|
2004-07-04 15:56:55 +00:00
|
|
|
(* func) (icon_view, path, data);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
gtk_tree_path_free (path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_set_selection_mode:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @mode: The selection mode
|
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Sets the selection mode of the @icon_view.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_selection_mode (GtkIconView *icon_view,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkSelectionMode mode)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (mode == icon_view->priv->selection_mode)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (mode == GTK_SELECTION_NONE ||
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->selection_mode == GTK_SELECTION_MULTIPLE)
|
|
|
|
gtk_icon_view_unselect_all (icon_view);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->selection_mode = mode;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_object_notify (G_OBJECT (icon_view), "selection_mode");
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_get_selection_mode:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-13 05:15:49 +00:00
|
|
|
* Gets the selection mode of the @icon_view.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Return value: the current selection mode
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
GtkSelectionMode
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_selection_mode (GtkIconView *icon_view)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), GTK_SELECTION_SINGLE);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
return icon_view->priv->selection_mode;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_set_model:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @model: The model.
|
|
|
|
*
|
2004-07-13 05:15:49 +00:00
|
|
|
* Sets the model for a #GtkIconView.
|
|
|
|
* If the @icon_view already has a model set, it will remove
|
|
|
|
* it before setting the new model. If @model is %NULL, then
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* it will unset the old model.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_model (GtkIconView *icon_view,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkTreeModel *model)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
if (model != NULL)
|
|
|
|
g_return_if_fail (GTK_IS_TREE_MODEL (model));
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->model == model)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (model)
|
|
|
|
{
|
|
|
|
GType pixbuf_column_type, text_column_type;
|
|
|
|
|
|
|
|
g_return_if_fail (gtk_tree_model_get_flags (model) & GTK_TREE_MODEL_LIST_ONLY);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->pixbuf_column != -1)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
pixbuf_column_type = gtk_tree_model_get_column_type (icon_view->priv->model,
|
|
|
|
icon_view->priv->pixbuf_column);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
g_return_if_fail (pixbuf_column_type == GDK_TYPE_PIXBUF);
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->text_column != -1)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
text_column_type = gtk_tree_model_get_column_type (icon_view->priv->model,
|
|
|
|
icon_view->priv->pixbuf_column);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
g_return_if_fail (text_column_type == G_TYPE_STRING);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->model)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_handlers_disconnect_by_func (icon_view->priv->model,
|
|
|
|
gtk_icon_view_row_changed,
|
|
|
|
icon_view);
|
|
|
|
g_signal_handlers_disconnect_by_func (icon_view->priv->model,
|
|
|
|
gtk_icon_view_row_inserted,
|
|
|
|
icon_view);
|
|
|
|
g_signal_handlers_disconnect_by_func (icon_view->priv->model,
|
|
|
|
gtk_icon_view_row_deleted,
|
|
|
|
icon_view);
|
|
|
|
g_signal_handlers_disconnect_by_func (icon_view->priv->model,
|
|
|
|
gtk_icon_view_rows_reordered,
|
|
|
|
icon_view);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_object_unref (icon_view->priv->model);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_list_foreach (icon_view->priv->items, (GFunc)gtk_icon_view_item_free, NULL);
|
|
|
|
g_list_free (icon_view->priv->items);
|
|
|
|
icon_view->priv->items = NULL;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->model = model;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->model)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_object_ref (icon_view->priv->model);
|
|
|
|
g_signal_connect (icon_view->priv->model,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
"row_changed",
|
2004-07-04 15:56:55 +00:00
|
|
|
G_CALLBACK (gtk_icon_view_row_changed),
|
|
|
|
icon_view);
|
|
|
|
g_signal_connect (icon_view->priv->model,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
"row_inserted",
|
2004-07-04 15:56:55 +00:00
|
|
|
G_CALLBACK (gtk_icon_view_row_inserted),
|
|
|
|
icon_view);
|
|
|
|
g_signal_connect (icon_view->priv->model,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
"row_deleted",
|
2004-07-04 15:56:55 +00:00
|
|
|
G_CALLBACK (gtk_icon_view_row_deleted),
|
|
|
|
icon_view);
|
|
|
|
g_signal_connect (icon_view->priv->model,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
"rows_reordered",
|
2004-07-04 15:56:55 +00:00
|
|
|
G_CALLBACK (gtk_icon_view_rows_reordered),
|
|
|
|
icon_view);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_build_items (icon_view);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
2004-07-03 10:04:14 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_object_notify (G_OBJECT (icon_view), "model");
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_get_model:
|
|
|
|
* @icon_view: a #GtkIconView
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Returns the model the #GtkIconView is based on. Returns %NULL if the
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* model is unset.
|
|
|
|
*
|
|
|
|
* Return value: A #GtkTreeModel, or %NULL if none is currently being used.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
GtkTreeModel *
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_model (GtkIconView *icon_view)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
return icon_view->priv->model;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_set_text_column:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @column: A column in the currently used model.
|
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Sets the column with text for @icon_view to be @column. The text
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* column must be of type #G_TYPE_STRING.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_text_column (GtkIconView *icon_view,
|
2004-07-13 05:15:49 +00:00
|
|
|
gint column)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (column == icon_view->priv->text_column)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (column == -1)
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->text_column = -1;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
else
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->model != NULL)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
|
|
|
GType column_type;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
column_type = gtk_tree_model_get_column_type (icon_view->priv->model, column);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
g_return_if_fail (column_type == G_TYPE_STRING);
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->text_column = column;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_invalidate_sizes (icon_view);
|
|
|
|
gtk_icon_view_queue_layout (icon_view);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_object_notify (G_OBJECT (icon_view), "text_column");
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_get_text_column:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Returns the column with text for @icon_view.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Returns: the text column, or -1 if it's unset.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
*/
|
|
|
|
gint
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_text_column (GtkIconView *icon_view)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
return icon_view->priv->text_column;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_set_markup_column:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @column: A column in the currently used model.
|
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Sets the column with markup information for @icon_view to be
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @column. The markup column must be of type #G_TYPE_STRING.
|
|
|
|
* If the markup column is set to something, it overrides
|
2004-07-13 05:15:49 +00:00
|
|
|
* the text column set by gtk_icon_view_set_text_column().
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_markup_column (GtkIconView *icon_view,
|
2004-07-05 11:34:29 +00:00
|
|
|
gint column)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (column == icon_view->priv->markup_column)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (column == -1)
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->markup_column = -1;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
else
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->model != NULL)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
|
|
|
GType column_type;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
column_type = gtk_tree_model_get_column_type (icon_view->priv->model, column);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
g_return_if_fail (column_type == G_TYPE_STRING);
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->markup_column = column;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_invalidate_sizes (icon_view);
|
|
|
|
gtk_icon_view_queue_layout (icon_view);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_object_notify (G_OBJECT (icon_view), "markup_column");
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_get_markup_column:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Returns the column with markup text for @icon_view.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Returns: the markup column, or -1 if it's unset.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
*/
|
|
|
|
gint
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_markup_column (GtkIconView *icon_view)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
return icon_view->priv->markup_column;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_set_pixbuf_column:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @column: A column in the currently used model.
|
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Sets the column with pixbufs for @icon_view to be @column. The pixbuf
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* column must be of type #GDK_TYPE_PIXBUF
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view,
|
2004-07-13 05:15:49 +00:00
|
|
|
gint column)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (column == icon_view->priv->pixbuf_column)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (column == -1)
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->pixbuf_column = -1;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
else
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->model != NULL)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
|
|
|
GType column_type;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
column_type = gtk_tree_model_get_column_type (icon_view->priv->model, column);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
g_return_if_fail (column_type == GDK_TYPE_PIXBUF);
|
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
icon_view->priv->pixbuf_column = column;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_invalidate_sizes (icon_view);
|
|
|
|
gtk_icon_view_queue_layout (icon_view);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_object_notify (G_OBJECT (icon_view), "pixbuf_column");
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_get_pixbuf_column:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Returns the column with pixbufs for @icon_view.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Returns: the pixbuf column, or -1 if it's unset.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
*/
|
|
|
|
gint
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
return icon_view->priv->pixbuf_column;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_select_path:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @path: The #GtkTreePath to be selected.
|
|
|
|
*
|
|
|
|
* Selects the row at @path.
|
2004-07-13 05:15:49 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_path (GtkIconView *icon_view,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkTreePath *path)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
|
|
|
g_return_if_fail (icon_view->priv->model != NULL);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
g_return_if_fail (path != NULL);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = g_list_nth (icon_view->priv->items,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gtk_tree_path_get_indices(path)[0])->data;
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_item (icon_view, item);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_unselect_path:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @path: The #GtkTreePath to be unselected.
|
|
|
|
*
|
|
|
|
* Unselects the row at @path.
|
2004-07-13 05:15:49 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_path (GtkIconView *icon_view,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkTreePath *path)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
|
|
|
g_return_if_fail (icon_view->priv->model != NULL);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
g_return_if_fail (path != NULL);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = g_list_nth (icon_view->priv->items,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gtk_tree_path_get_indices(path)[0])->data;
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_item (icon_view, item);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_get_selected_items:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
*
|
|
|
|
* Creates a list of path of all selected items. Additionally, if you are
|
|
|
|
* planning on modifying the model after calling this function, you may
|
|
|
|
* want to convert the returned list into a list of #GtkTreeRowReference<!-- -->s.
|
|
|
|
* To do this, you can use gtk_tree_row_reference_new().
|
|
|
|
*
|
|
|
|
* To free the return value, use:
|
|
|
|
* <informalexample><programlisting>
|
|
|
|
* g_list_foreach (list, gtk_tree_path_free, NULL);
|
|
|
|
* g_list_free (list);
|
|
|
|
* </programlisting></informalexample>
|
|
|
|
*
|
|
|
|
* Return value: A #GList containing a #GtkTreePath for each selected row.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
GList *
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_get_selected_items (GtkIconView *icon_view)
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
GList *selected = NULL;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (list = icon_view->priv->items; list != NULL; list = list->next)
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = list->data;
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
|
|
|
if (item->selected)
|
|
|
|
{
|
|
|
|
GtkTreePath *path = gtk_tree_path_new_from_indices (item->index, -1);
|
|
|
|
|
|
|
|
selected = g_list_prepend (selected, path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return selected;
|
|
|
|
}
|
|
|
|
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_select_all:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
2004-07-04 15:56:55 +00:00
|
|
|
* Selects all the icons. @icon_view must has its selection mode set
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* to #GTK_SELECTION_MULTIPLE.
|
2004-07-04 20:35:35 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_select_all (GtkIconView *icon_view)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
|
|
|
GList *items;
|
|
|
|
gboolean dirty = FALSE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
if (icon_view->priv->selection_mode != GTK_SELECTION_MULTIPLE)
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
return;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
for (items = icon_view->priv->items; items; items = items->next)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item = items->data;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
|
|
|
if (!item->selected)
|
|
|
|
{
|
|
|
|
dirty = TRUE;
|
|
|
|
item->selected = TRUE;
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_queue_draw_item (icon_view, item);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dirty)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_unselect_all:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
*
|
|
|
|
* Unselects all the icons.
|
2004-07-04 20:35:35 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_unselect_all (GtkIconView *icon_view)
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
{
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
gboolean dirty = FALSE;
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
dirty = gtk_icon_view_unselect_all_internal (icon_view);
|
Fix the "selection_changed" signal to not get emitted twice in some cases.
2004-07-04 Anders Carlsson <andersca@gnome.org>
* configure.in:
* libegg/iconlist/eggiconlist.c: (egg_icon_list_expose),
(scroll_timeout), (egg_icon_list_motion),
(egg_icon_list_button_press), (egg_icon_list_update_rubberband),
(egg_icon_list_start_rubberbanding),
(egg_icon_list_stop_rubberbanding),
(egg_icon_list_unselect_all_internal),
(egg_icon_list_real_select_all),
(egg_icon_list_adjustment_changed), (egg_icon_list_item_free),
(egg_icon_list_select_item), (verify_items),
(egg_icon_list_row_changed), (egg_icon_list_row_inserted),
(egg_icon_list_row_deleted), (egg_icon_list_rows_reordered),
(egg_icon_list_select_all_between),
(egg_icon_list_move_cursor_up_down),
(egg_icon_list_move_cursor_page_up_down),
(egg_icon_list_move_cursor_left_right),
(egg_icon_list_move_cursor_start_end), (egg_icon_list_set_model),
(egg_icon_list_get_selected_items), (egg_icon_list_select_all),
(egg_icon_list_unselect_all):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove):
Fix the "selection_changed" signal to not get emitted twice in some cases.
Also fix a bunch of issues reported by Jonathan.
2004-07-04 12:43:26 +00:00
|
|
|
|
|
|
|
if (dirty)
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_path_is_selected:
|
|
|
|
* @icon_view: A #GtkIconView.
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @path: A #GtkTreePath to check selection on.
|
|
|
|
*
|
|
|
|
* Returns %TRUE if the icon pointed to by @path is currently
|
|
|
|
* selected. If @icon does not point to a valid location, %FALSE is returned.
|
|
|
|
*
|
|
|
|
* Return value: %TRUE if @path is selected.
|
2004-07-04 20:35:35 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
**/
|
|
|
|
gboolean
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_path_is_selected (GtkIconView *icon_view,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkTreePath *path)
|
|
|
|
{
|
2004-07-04 15:56:55 +00:00
|
|
|
GtkIconViewItem *item;
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE);
|
|
|
|
g_return_val_if_fail (icon_view->priv->model != NULL, FALSE);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
g_return_val_if_fail (path != NULL, FALSE);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
item = g_list_nth (icon_view->priv->items,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
gtk_tree_path_get_indices(path)[0])->data;
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
return item->selected;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-07-04 15:56:55 +00:00
|
|
|
* gtk_icon_view_item_activated:
|
|
|
|
* @icon_view: A #GtkIconView
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
* @path: The #GtkTreePath to be activated
|
|
|
|
*
|
|
|
|
* Activates the item determined by @path.
|
2004-07-04 20:35:35 +00:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
**/
|
|
|
|
void
|
2004-07-04 15:56:55 +00:00
|
|
|
gtk_icon_view_item_activated (GtkIconView *icon_view,
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
GtkTreePath *path)
|
|
|
|
{
|
2004-07-04 20:35:35 +00:00
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
|
|
|
g_return_if_fail (path != NULL);
|
|
|
|
|
2004-07-04 15:56:55 +00:00
|
|
|
g_signal_emit (G_OBJECT (icon_view), icon_view_signals[ITEM_ACTIVATED], 0, path);
|
Document functions and fix a few bugs.
2004-07-03 Anders Carlsson <andersca@gnome.org>
* libegg/iconlist/eggiconlist.c: (egg_icon_list_add_move_binding),
(egg_icon_list_real_move_cursor), (egg_icon_list_new),
(egg_icon_list_new_with_model), (egg_icon_list_get_path_at_pos),
(egg_icon_list_selected_foreach),
(egg_icon_list_set_selection_mode),
(egg_icon_list_get_selection_mode), (egg_icon_list_set_model),
(egg_icon_list_get_model), (egg_icon_list_set_text_column),
(egg_icon_list_get_text_column), (egg_icon_list_set_markup_column),
(egg_icon_list_get_markup_column),
(egg_icon_list_set_pixbuf_column),
(egg_icon_list_get_pixbuf_column), (egg_icon_list_select_path),
(egg_icon_list_unselect_path), (egg_icon_list_select_all),
(egg_icon_list_unselect_all), (egg_icon_list_path_is_selected),
(egg_icon_list_item_activated):
* libegg/iconlist/eggiconlist.h:
* libegg/iconlist/testiconlist.c: (foreach_selected_remove_func),
(foreach_selected_remove), (selection_changed), (main):
Document functions and fix a few bugs.
2004-07-03 08:01:34 +00:00
|
|
|
}
|
2004-07-18 03:39:50 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* gtk_icon_view_set_orientation:
|
|
|
|
* @icon_view: a #GtkIconView
|
|
|
|
* @orientation: the relative position of texts and icons
|
|
|
|
*
|
|
|
|
* Sets the ::orientation property which determines whether the labels
|
|
|
|
* are drawn beside the icons instead of below.
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
gtk_icon_view_set_orientation (GtkIconView *icon_view,
|
|
|
|
GtkOrientation orientation)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
|
|
|
|
|
|
|
|
if (icon_view->priv->orientation != orientation)
|
|
|
|
{
|
|
|
|
icon_view->priv->orientation = orientation;
|
|
|
|
|
|
|
|
gtk_icon_view_invalidate_sizes (icon_view);
|
|
|
|
gtk_icon_view_queue_layout (icon_view);
|
|
|
|
|
|
|
|
g_object_notify (G_OBJECT (icon_view), "orientation");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gtk_icon_view_get_orientation:
|
|
|
|
* @icon_view: a #GtkIconView
|
|
|
|
*
|
|
|
|
* Returns the value of the ::orientation property which determines
|
|
|
|
* whether the labels are drawn beside the icons instead of below.
|
|
|
|
*
|
|
|
|
* Return value: the relative position of texts and icons
|
|
|
|
*
|
|
|
|
* Since: 2.6
|
|
|
|
**/
|
|
|
|
GtkOrientation
|
|
|
|
gtk_icon_view_get_orientation (GtkIconView *icon_view)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view),
|
|
|
|
GTK_ORIENTATION_VERTICAL);
|
|
|
|
|
|
|
|
return icon_view->priv->orientation;
|
|
|
|
}
|