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
pwmt
zathura
Commits
2437d854
Commit
2437d854
authored
May 27, 2011
by
Moritz Lipp
Browse files
Remove obsolete page_blank function
parent
3c9e1f6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
utils.c
View file @
2437d854
...
...
@@ -153,48 +153,6 @@ execute_command(char* const argv[], char** output)
return
true
;
}
GtkWidget
*
page_blank
(
unsigned
int
width
,
unsigned
int
height
)
{
if
((
width
==
0
)
||
(
height
==
0
))
{
return
NULL
;
}
guchar
*
buffer
=
malloc
(
sizeof
(
guchar
)
*
(
width
*
height
*
1
));
if
(
!
buffer
)
{
return
NULL
;
}
/* draw white */
for
(
unsigned
int
i
=
0
;
i
<
width
*
height
;
i
++
)
{
buffer
[
i
]
=
255
;
}
GdkPixbuf
*
pixbuf
=
gdk_pixbuf_new_from_data
(
buffer
,
GDK_COLORSPACE_RGB
,
FALSE
,
8
,
width
,
height
,
1
,
NULL
,
NULL
);
if
(
!
pixbuf
)
{
free
(
buffer
);
return
NULL
;
}
/* convert to image */
GtkWidget
*
image
=
gtk_image_new
();
if
(
!
image
)
{
free
(
buffer
);
g_object_unref
(
pixbuf
);
return
false
;
}
gtk_image_set_from_pixbuf
(
GTK_IMAGE
(
image
),
pixbuf
);
gtk_widget_show
(
image
);
/*free(buffer);*/
// XXX: Read documentation
g_object_unref
(
pixbuf
);
return
image
;
}
void
document_index_build
(
GtkTreeModel
*
model
,
GtkTreeIter
*
parent
,
girara_tree_node_t
*
tree
)
{
...
...
utils.h
View file @
2437d854
...
...
@@ -50,15 +50,6 @@ bool file_valid_extension(zathura_t* zathura, const char* path);
*/
bool
execute_command
(
char
*
const
argv
[],
char
**
output
);
/**
* Creates a blank page
*
* @param width The width of the page
* @param height The height of the page
* @return The widget of the page or NULL if an error occured
*/
GtkWidget
*
page_blank
(
unsigned
int
width
,
unsigned
int
height
);
/**
* Generates the document index based upon the list retreived from the document
* object.
...
...
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