diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-05-04 15:09:53 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-05-04 15:09:53 +0800 |
commit | 91310499b326bafc8da96814e2e7cdde441c539b (patch) | |
tree | a8e4dfa93eebc24e599c6ccbd39764c335c872d9 | |
parent | e6f93efbadf410e6c9dcd9b4326562b27a8cfef0 (diff) | |
download | gsoc2013-evolution-91310499b326bafc8da96814e2e7cdde441c539b.tar.gz gsoc2013-evolution-91310499b326bafc8da96814e2e7cdde441c539b.tar.zst gsoc2013-evolution-91310499b326bafc8da96814e2e7cdde441c539b.zip |
EIconBar/EShortcutBar constification.
svn path=/trunk/; revision=2792
-rw-r--r-- | widgets/shortcut-bar/ChangeLog | 14 | ||||
-rw-r--r-- | widgets/shortcut-bar/e-icon-bar-bg-item.c | 1 | ||||
-rw-r--r-- | widgets/shortcut-bar/e-icon-bar.c | 2 | ||||
-rw-r--r-- | widgets/shortcut-bar/e-icon-bar.h | 2 | ||||
-rw-r--r-- | widgets/shortcut-bar/e-shortcut-bar.c | 12 | ||||
-rw-r--r-- | widgets/shortcut-bar/e-shortcut-bar.h | 6 |
6 files changed, 26 insertions, 11 deletions
diff --git a/widgets/shortcut-bar/ChangeLog b/widgets/shortcut-bar/ChangeLog index d8b7d82022..c4cbca5113 100644 --- a/widgets/shortcut-bar/ChangeLog +++ b/widgets/shortcut-bar/ChangeLog @@ -1,5 +1,19 @@ 2000-05-04 Ettore Perazzoli <ettore@helixcode.com> + * e-icon-bar-bg-item.c (e_icon_bar_bg_item_draw): Initialize + `shadow' to placate compiler. + + * e-icon-bar.c (e_icon_bar_add_item): @text made const-safe. + + * e-shortcut-bar.c (e_shortcut_bar_add_group): @group_name made + const-safe. + (e_shortcut_bar_add_item): @item_url and @item_name made + const-safe. + (e_shortcut_bar_get_image_from_url): @item_url made const-safe. + (e_shortcut_bar_load_image): @filename made const-safe. + +2000-05-04 Ettore Perazzoli <ettore@helixcode.com> + * test-shortcut-bar.c (icon_callback): Adapted to the new `EShortcutBarIconCallback' typedef: get a @data parameter and get a const-safe @url. diff --git a/widgets/shortcut-bar/e-icon-bar-bg-item.c b/widgets/shortcut-bar/e-icon-bar-bg-item.c index 01ac735d8f..b3a62bbf5b 100644 --- a/widgets/shortcut-bar/e-icon-bar-bg-item.c +++ b/widgets/shortcut-bar/e-icon-bar-bg-item.c @@ -192,6 +192,7 @@ e_icon_bar_bg_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, icon_bar = ibitem->icon_bar; g_return_if_fail (icon_bar != NULL); style = GTK_WIDGET (icon_bar)->style; + shadow = GTK_SHADOW_NONE; /* Draw the highlight around the current highlight item. */ item_num = -1; diff --git a/widgets/shortcut-bar/e-icon-bar.c b/widgets/shortcut-bar/e-icon-bar.c index bce54320bc..75623a8626 100644 --- a/widgets/shortcut-bar/e-icon-bar.c +++ b/widgets/shortcut-bar/e-icon-bar.c @@ -565,7 +565,7 @@ rgb_from_gdk_color (GdkColor *color) gint e_icon_bar_add_item (EIconBar *icon_bar, GdkPixbuf *image, - gchar *text, + const gchar *text, gint position) { EIconBarItem item; diff --git a/widgets/shortcut-bar/e-icon-bar.h b/widgets/shortcut-bar/e-icon-bar.h index f1bedb98c9..bcb15d0c5a 100644 --- a/widgets/shortcut-bar/e-icon-bar.h +++ b/widgets/shortcut-bar/e-icon-bar.h @@ -172,7 +172,7 @@ void e_icon_bar_set_view_type (EIconBar *icon_bar, added at the end. It returns the index of the item. */ gint e_icon_bar_add_item (EIconBar *icon_bar, GdkPixbuf *image, - gchar *text, + const gchar *text, gint position); /* Reorders an item. Note that position refers to the new position to add the diff --git a/widgets/shortcut-bar/e-shortcut-bar.c b/widgets/shortcut-bar/e-shortcut-bar.c index e07e840f53..89c5ef7468 100644 --- a/widgets/shortcut-bar/e-shortcut-bar.c +++ b/widgets/shortcut-bar/e-shortcut-bar.c @@ -84,8 +84,8 @@ static void e_shortcut_bar_on_drag_end (GtkWidget *widget, static void e_shortcut_bar_stop_editing (GtkWidget *button, EShortcutBar *shortcut_bar); static GdkPixbuf* e_shortcut_bar_get_image_from_url (EShortcutBar *shortcut_bar, - gchar *item_url); -static GdkPixbuf* e_shortcut_bar_load_image (gchar *filename); + const gchar *item_url); +static GdkPixbuf* e_shortcut_bar_load_image (const gchar *filename); enum @@ -188,7 +188,7 @@ e_shortcut_bar_destroy (GtkObject *object) gint -e_shortcut_bar_add_group (EShortcutBar *shortcut_bar, gchar *group_name) +e_shortcut_bar_add_group (EShortcutBar *shortcut_bar, const gchar *group_name) { EShortcutBarGroup *group, tmp_group; gint group_num; @@ -280,7 +280,7 @@ e_shortcut_bar_remove_group (EShortcutBar *shortcut_bar, gint e_shortcut_bar_add_item (EShortcutBar *shortcut_bar, gint group_num, - gchar *item_url, gchar *item_name) + const gchar *item_url, const gchar *item_name) { EShortcutBarGroup *group; GdkPixbuf *image; @@ -546,7 +546,7 @@ e_shortcut_bar_set_icon_callback (EShortcutBar *shortcut_bar, static GdkPixbuf * e_shortcut_bar_get_image_from_url (EShortcutBar *shortcut_bar, - gchar *item_url) + const gchar *item_url) { GdkPixbuf *icon = NULL; @@ -568,7 +568,7 @@ e_shortcut_bar_get_image_from_url (EShortcutBar *shortcut_bar, static GdkPixbuf * -e_shortcut_bar_load_image (gchar *filename) +e_shortcut_bar_load_image (const gchar *filename) { gchar *pathname; GdkPixbuf *image = NULL; diff --git a/widgets/shortcut-bar/e-shortcut-bar.h b/widgets/shortcut-bar/e-shortcut-bar.h index 682967b12a..ef40c89367 100644 --- a/widgets/shortcut-bar/e-shortcut-bar.h +++ b/widgets/shortcut-bar/e-shortcut-bar.h @@ -96,7 +96,7 @@ GtkWidget* e_shortcut_bar_new (void); /* Adds a new group, returning the index. */ gint e_shortcut_bar_add_group (EShortcutBar *shortcut_bar, - gchar *group_name); + const gchar *group_name); void e_shortcut_bar_remove_group (EShortcutBar *shortcut_bar, gint group_num); @@ -108,8 +108,8 @@ void e_shortcut_bar_set_view_type (EShortcutBar *shortcut_bar, /* Adds a new item to a group, returning the index within the group. */ gint e_shortcut_bar_add_item (EShortcutBar *shortcut_bar, gint group_num, - gchar *item_url, - gchar *item_name); + const gchar *item_url, + const gchar *item_name); void e_shortcut_bar_start_editing_item (EShortcutBar *shortcut_bar, gint group_num, |