mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 12:46:00 +01:00
Remove obsolete page_blank function
This commit is contained in:
parent
3c9e1f6e55
commit
2437d85471
2 changed files with 0 additions and 51 deletions
42
utils.c
42
utils.c
|
@ -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)
|
||||
{
|
||||
|
|
9
utils.h
9
utils.h
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue