Commit 2437d854 authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Remove obsolete page_blank function

parent 3c9e1f6e
......@@ -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)
{
......
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment