[gtk+] entry: simplify code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] entry: simplify code
- Date: Thu, 1 Dec 2011 00:17:57 +0000 (UTC)
commit d47e82ffddc4df01e76d3829f25bbc29dc48672b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Nov 30 19:05:34 2011 -0500
entry: simplify code
We can unconditionally call into the icon helper methods now that we
removed the g_return_val_if_fail() checks.
gtk/gtkentry.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index f0b6cb7..989b24a 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -8019,8 +8019,7 @@ gtk_entry_get_icon_gicon (GtkEntry *entry,
if (!icon_info)
return NULL;
- return _gtk_icon_helper_get_storage_type (icon_info->icon_helper) == GTK_IMAGE_GICON ?
- _gtk_icon_helper_peek_gicon (icon_info->icon_helper) : NULL;
+ return _gtk_icon_helper_peek_gicon (icon_info->icon_helper);
}
/**
@@ -8053,9 +8052,7 @@ gtk_entry_get_icon_stock (GtkEntry *entry,
if (!icon_info)
return NULL;
- return _gtk_icon_helper_get_storage_type (icon_info->icon_helper) == GTK_IMAGE_STOCK ?
- _gtk_icon_helper_get_stock_id (icon_info->icon_helper) : NULL;
-
+ return _gtk_icon_helper_get_stock_id (icon_info->icon_helper);
}
/**
@@ -8088,9 +8085,7 @@ gtk_entry_get_icon_name (GtkEntry *entry,
if (!icon_info)
return NULL;
- return _gtk_icon_helper_get_storage_type (icon_info->icon_helper) == GTK_IMAGE_ICON_NAME ?
- _gtk_icon_helper_get_icon_name (icon_info->icon_helper) : NULL;
-
+ return _gtk_icon_helper_get_icon_name (icon_info->icon_helper);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]