Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gtk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1,151
Issues
1,151
List
Board
Labels
Milestones
Merge Requests
88
Merge Requests
88
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gtk
Commits
d3bf602c
Commit
d3bf602c
authored
Oct 14, 2015
by
Benjamin Otte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iconcache: Remove unused function
parent
371f5016
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
98 deletions
+0
-98
gtkiconcache.c
gtk/gtkiconcache.c
+0
-82
gtkiconcache.h
gtk/gtkiconcache.h
+0
-16
No files found.
gtk/gtkiconcache.c
View file @
d3bf602c
...
...
@@ -541,85 +541,3 @@ G_GNUC_END_IGNORE_DEPRECATIONS
return
pixbuf
;
}
GtkIconData
*
_gtk_icon_cache_get_icon_data
(
GtkIconCache
*
cache
,
const
gchar
*
icon_name
,
gint
directory_index
)
{
guint32
offset
,
image_data_offset
,
meta_data_offset
;
GtkIconData
*
data
;
int
i
;
offset
=
find_image_offset
(
cache
,
icon_name
,
directory_index
);
if
(
!
offset
)
return
NULL
;
image_data_offset
=
GET_UINT32
(
cache
->
buffer
,
offset
+
4
);
if
(
!
image_data_offset
)
return
NULL
;
meta_data_offset
=
GET_UINT32
(
cache
->
buffer
,
image_data_offset
+
4
);
if
(
!
meta_data_offset
)
return
NULL
;
data
=
g_slice_new0
(
GtkIconData
);
data
->
ref
=
1
;
offset
=
GET_UINT32
(
cache
->
buffer
,
meta_data_offset
);
if
(
offset
)
{
data
->
has_embedded_rect
=
TRUE
;
data
->
x0
=
GET_UINT16
(
cache
->
buffer
,
offset
);
data
->
y0
=
GET_UINT16
(
cache
->
buffer
,
offset
+
2
);
data
->
x1
=
GET_UINT16
(
cache
->
buffer
,
offset
+
4
);
data
->
y1
=
GET_UINT16
(
cache
->
buffer
,
offset
+
6
);
}
offset
=
GET_UINT32
(
cache
->
buffer
,
meta_data_offset
+
4
);
if
(
offset
)
{
data
->
n_attach_points
=
GET_UINT32
(
cache
->
buffer
,
offset
);
data
->
attach_points
=
g_new
(
GdkPoint
,
data
->
n_attach_points
);
for
(
i
=
0
;
i
<
data
->
n_attach_points
;
i
++
)
{
data
->
attach_points
[
i
].
x
=
GET_UINT16
(
cache
->
buffer
,
offset
+
4
+
4
*
i
);
data
->
attach_points
[
i
].
y
=
GET_UINT16
(
cache
->
buffer
,
offset
+
4
+
4
*
i
+
2
);
}
}
offset
=
GET_UINT32
(
cache
->
buffer
,
meta_data_offset
+
8
);
if
(
offset
)
{
gint
n_names
;
gchar
*
lang
,
*
name
;
gchar
**
langs
;
GHashTable
*
table
=
g_hash_table_new
(
g_str_hash
,
g_str_equal
);
n_names
=
GET_UINT32
(
cache
->
buffer
,
offset
);
for
(
i
=
0
;
i
<
n_names
;
i
++
)
{
lang
=
cache
->
buffer
+
GET_UINT32
(
cache
->
buffer
,
offset
+
4
+
8
*
i
);
name
=
cache
->
buffer
+
GET_UINT32
(
cache
->
buffer
,
offset
+
4
+
8
*
i
+
4
);
g_hash_table_insert
(
table
,
lang
,
name
);
}
langs
=
(
gchar
**
)
g_get_language_names
();
for
(
i
=
0
;
langs
[
i
];
i
++
)
{
name
=
g_hash_table_lookup
(
table
,
langs
[
i
]);
if
(
name
)
{
data
->
display_name
=
g_strdup
(
name
);
break
;
}
}
g_hash_table_destroy
(
table
);
}
return
data
;
}
gtk/gtkiconcache.h
View file @
d3bf602c
...
...
@@ -21,19 +21,6 @@
#include <gdk/gdk.h>
typedef
struct
_GtkIconCache
GtkIconCache
;
typedef
struct
_GtkIconData
GtkIconData
;
struct
_GtkIconData
{
gint
ref
;
gboolean
has_embedded_rect
;
gint
x0
,
y0
,
x1
,
y1
;
GdkPoint
*
attach_points
;
gint
n_attach_points
;
gchar
*
display_name
;
};
GtkIconCache
*
_gtk_icon_cache_new
(
const
gchar
*
data
);
GtkIconCache
*
_gtk_icon_cache_new_for_path
(
const
gchar
*
path
);
...
...
@@ -56,9 +43,6 @@ gint _gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
GdkPixbuf
*
_gtk_icon_cache_get_icon
(
GtkIconCache
*
cache
,
const
gchar
*
icon_name
,
gint
directory_index
);
GtkIconData
*
_gtk_icon_cache_get_icon_data
(
GtkIconCache
*
cache
,
const
gchar
*
icon_name
,
gint
directory_index
);
GtkIconCache
*
_gtk_icon_cache_ref
(
GtkIconCache
*
cache
);
void
_gtk_icon_cache_unref
(
GtkIconCache
*
cache
);
...
...
Write
Preview
Markdown
is supported
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