diff options
author | rbuj <[email protected]> | 2022-02-10 11:46:49 +0100 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2022-03-22 12:32:48 -0400 |
commit | 79c84c1f216805d2fd87ccebf1e791cc61167d8a (patch) | |
tree | aefcaeb929f03bcecfc74d2ce00d21df64991699 /libcaja-private/caja-bookmark.c | |
parent | 7d64342c6914b8f502512fd111ec3acb2083741e (diff) | |
download | caja-79c84c1f216805d2fd87ccebf1e791cc61167d8a.tar.bz2 caja-79c84c1f216805d2fd87ccebf1e791cc61167d8a.tar.xz |
caja-bookmark: drop create_image_cairo_for_bookmark
Diffstat (limited to 'libcaja-private/caja-bookmark.c')
-rw-r--r-- | libcaja-private/caja-bookmark.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/libcaja-private/caja-bookmark.c b/libcaja-private/caja-bookmark.c index 587e8cc9..0dd8116a 100644 --- a/libcaja-private/caja-bookmark.c +++ b/libcaja-private/caja-bookmark.c @@ -585,20 +585,6 @@ caja_bookmark_new (GFile *location, const char *name, gboolean has_custom_name, return new_bookmark; } -static cairo_surface_t * -create_image_cairo_for_bookmark (CajaBookmark *bookmark) -{ - cairo_surface_t *surface; - - surface = caja_bookmark_get_surface (bookmark, GTK_ICON_SIZE_MENU); - if (surface == NULL) - { - return NULL; - } - - return surface; -} - static GtkWidget * bookmark_image_menu_item_new_from_surface (cairo_surface_t *icon_surface, const gchar *label_name) @@ -644,20 +630,20 @@ bookmark_image_menu_item_new_from_surface (cairo_surface_t *icon_surface, GtkWidget * caja_bookmark_menu_item_new (CajaBookmark *bookmark) { - cairo_surface_t *image_cairo; - - image_cairo = create_image_cairo_for_bookmark (bookmark); + GtkWidget *menu_item = NULL; if (strlen (bookmark->details->name) > 0) { - GtkWidget *menu_item; - - menu_item = bookmark_image_menu_item_new_from_surface (image_cairo, bookmark->details->name); - - return menu_item; + cairo_surface_t *surface; + + surface = + caja_bookmark_get_surface (bookmark, + GTK_ICON_SIZE_MENU); + menu_item = + bookmark_image_menu_item_new_from_surface (surface, + bookmark->details->name); } - else - return NULL; + return menu_item; } gboolean |