Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Matias De lellis
xfdesktop
Commits
0b5552ed
Commit
0b5552ed
authored
Dec 13, 2008
by
Brian J. Tarricone
Committed by
Brian Tarricone
Aug 13, 2009
Browse files
WIP: cell layout support
parent
eebe64cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/xfdesktop-icon-view.c
View file @
0b5552ed
...
...
@@ -167,8 +167,43 @@ struct _XfdesktopIconViewPrivate
gdouble
cell_text_width_proportion
;
gboolean
ellipsize_icon_labels
;
GSList
*
cells
;
};
typedef
struct
{
GtkCellRenderer
*
render
;
gboolean
expand
;
GtkPackType
pack
;
}
CellInfo
;
static
void
xfdesktop_icon_view_cell_layout_init
(
GtkCellLayoutIface
*
iface
);
static
void
xfdesktop_icon_view_cell_pack_start
(
GtkCellLayout
*
cell_layout
,
GtkCellRenderer
*
cell
,
gboolean
expand
);
static
void
xfdesktop_icon_view_cell_pack_end
(
GtkCellLayout
*
cell_layout
,
GtkCellRenderer
*
cell
,
gboolean
expand
);
static
void
xfdesktop_icon_view_cell_clear
(
GtkCellLayout
*
cell_layout
);
static
void
xfdesktop_icon_view_cell_add_attribute
(
GtkCellLayout
*
cell_layout
,
GtkCellRenderer
*
cell
,
const
gchar
*
attribute
,
gint
column
);
static
void
xfdesktop_icon_view_cell_set_cell_data_func
(
GtkCellLayout
*
cell_layout
,
GtkCellRenderer
*
cell
,
GtkCellLayoutDataFunc
func
,
gpointer
func_data
,
GDestroyNotify
destroy
);
static
void
xfdesktop_icon_view_cell_clear_attributes
(
GtkCellLayout
*
cell_layout
,
GtkCellRenderer
*
cell
);
static
void
xfdesktop_icon_view_cell_reorder
(
GtkCellLayout
*
cell_layout
,
GtkCellRenderer
*
cell
,
gint
position
);
static
GList
*
xfdesktop_icon_view_cell_get_cells
(
GtkCellLayout
*
cell_layout
);
static
gboolean
xfdesktop_icon_view_button_press
(
GtkWidget
*
widget
,
GdkEventButton
*
evt
,
gpointer
user_data
);
...
...
@@ -332,7 +367,9 @@ static guint __signals[SIG_N_SIGNALS] = { 0, };
static
GQuark
xfdesktop_cell_highlight_quark
=
0
;
G_DEFINE_TYPE
(
XfdesktopIconView
,
xfdesktop_icon_view
,
GTK_TYPE_WIDGET
)
G_DEFINE_TYPE_WITH_CODE
(
XfdesktopIconView
,
xfdesktop_icon_view
,
GTK_TYPE_WIDGET
,
G_IMPLEMENT_INTERFACE
(
GTK_TYPE_CELL_LAYOUT
,
xfdesktop_icon_view_cell_layout_init
))
static
void
...
...
@@ -585,6 +622,19 @@ xfdesktop_icon_view_class_init(XfdesktopIconViewClass *klass)
xfdesktop_cell_highlight_quark
=
g_quark_from_static_string
(
"xfdesktop-icon-view-cell-highlight"
);
}
static
void
xfdesktop_icon_view_cell_layout_init
(
GtkCellLayoutIface
*
iface
)
{
iface
->
pack_start
=
xfdesktop_icon_view_cell_pack_start
;
iface
->
pack_end
=
xfdesktop_icon_view_cell_pack_end
;
iface
->
clear
=
xfdesktop_icon_view_cell_clear
;
iface
->
add_attribute
=
xfdesktop_icon_biew_cell_add_attribute
;
iface
->
set_cell_data_func
=
xfdesktop_icon_view_cell_set_cell_data_func
;
iface
->
clear_attributes
=
xfdesktop_icon_view_cell_clear_attributes
;
iface
->
reorder
=
xfdesktop_icon_view_cell_reorder
;
iface
->
get_cells
=
xfdesktop_icon_view_cell_get_cells
;
}
static
void
xfdesktop_icon_view_init
(
XfdesktopIconView
*
icon_view
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment