diff options
author | Michael Meeks <michael@ximian.com> | 2002-02-20 16:43:20 +0000 |
---|---|---|
committer | Michael Meeks <michael@src.gnome.org> | 2002-02-20 16:43:20 +0000 |
commit | e776382d529d99b349b150163eda847a19f658c1 (patch) | |
tree | a09387a9b17c247b323628a14310fa7e021dadb4 /components/music | |
parent | b7d36b2b63136418d5a4aefdb27c2fc3466570a5 (diff) | |
download | nautilus-e776382d529d99b349b150163eda847a19f658c1.tar.gz |
remove usize mis-use.
2002-02-20 Michael Meeks <michael@ximian.com>
* components/throbber/nautilus-throbber.c
(nautilus_throbber_set_small_mode): remove usize
mis-use.
* components/text/nautilus-text-view.c: remove
bogus ghttp include.
* components/music/nautilus-music-view.c
(image_button_callback): upd. signal handling.
(xpm_dual_label_box, xpm_label_box): upd. container
border width.
(nautilus_music_view_update): fix leak & upd.
path handling.
* components/music/mpg123.c (eval_id3_format),
(mpg123_format_song_title): upd. path handling.
* components/hardware/main.c: include string.h
* components/hardware/nautilus-hardware-view.c
(setup_form_title): use gnome_program_locate_file.
* components/hardware/Makefile.am,
* components/sample/Makefile.am,
* components/tree/Makefile.am,
* components/text/Makefile.am,
* components/throbber/Makefile.am,
* components/music/Makefile.am: add disable
deprecated cflags.
* components/Makefile.am: remove image_viewer
* configure.in: upd.
Diffstat (limited to 'components/music')
-rw-r--r-- | components/music/Makefile.am | 1 | ||||
-rw-r--r-- | components/music/esd-audio.c | 2 | ||||
-rw-r--r-- | components/music/mpg123.c | 12 | ||||
-rw-r--r-- | components/music/nautilus-music-view.c | 25 |
4 files changed, 23 insertions, 17 deletions
diff --git a/components/music/Makefile.am b/components/music/Makefile.am index 8e383426a..70877d06f 100644 --- a/components/music/Makefile.am +++ b/components/music/Makefile.am @@ -12,6 +12,7 @@ INCLUDES = \ -DG_LOG_DOMAIN=\"Nautilus-Music\" \ -I$(top_srcdir) \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + $(DISABLE_DEPRECATED_CFLAGS) \ $(MUSIC_COMPONENT_CFLAGS) \ $(NULL) diff --git a/components/music/esd-audio.c b/components/music/esd-audio.c index aef0236f9..f189ce83d 100644 --- a/components/music/esd-audio.c +++ b/components/music/esd-audio.c @@ -1,9 +1,9 @@ #include <config.h> +#include <string.h> #include <pthread.h> #include "esd-audio.h" -#include "config.h" static gint fd = 0; static gpointer buffer; diff --git a/components/music/mpg123.c b/components/music/mpg123.c index ec76d692b..cd2dbc801 100644 --- a/components/music/mpg123.c +++ b/components/music/mpg123.c @@ -255,16 +255,14 @@ static gchar *eval_id3_format(const char *id3_format, struct id3tag_t *id3, const size_t alloc_size = 256; /* size of memory block allocations */ gboolean got_field = FALSE; - ans = g_malloc(allocated = alloc_size); - pathlen = strlen(path = g_dirname(filename)); - base = g_strdup(g_basename(filename)); + ans = g_malloc (allocated = alloc_size); + pathlen = strlen (path = g_path_get_dirname (filename)); + base = g_path_get_basename (filename); if ((ext = extname(base)) == NULL) { ext = ""; extlen = 0; - } - else - { + } else { *(ext - 1) = '\0'; extlen = strlen(ext); } @@ -403,7 +401,7 @@ gchar *mpg123_format_song_title(struct id3tag_t *tag, gchar * filename) /* * Format according to filename. */ - ret = g_strdup(g_basename(filename)); + ret = g_path_get_basename (filename); if (extname(ret) != NULL) *(extname(ret) - 1) = '\0'; /* removes period */ } diff --git a/components/music/nautilus-music-view.c b/components/music/nautilus-music-view.c index 73ef4e493..c50b983e4 100644 --- a/components/music/nautilus-music-view.c +++ b/components/music/nautilus-music-view.c @@ -476,7 +476,8 @@ nautilus_music_view_init (NautilusMusicView *music_view) gtk_widget_show (music_view->details->tree_view); font_name = eel_preferences_get (NAUTILUS_PREFERENCES_LIST_VIEW_FONT); - standard_font_size = eel_preferences_get_integer (NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL_FONT_SIZE); + standard_font_size = eel_preferences_get_integer ( + NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL_FONT_SIZE); #ifdef GNOME2_CONVERSION_COMPLETE font = nautilus_font_factory_get_font_by_family (font_name, standard_font_size); @@ -792,10 +793,14 @@ image_button_callback (GtkWidget * widget, NautilusMusicView *music_view) "clicked", (GtkSignalFunc) set_album_cover, music_view); - gtk_signal_connect_object (GTK_OBJECT (file_dialog->cancel_button), - "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT(file_dialog)); + + g_signal_connect_closure (file_dialog->cancel_button, + "clicked", + g_cclosure_new_swap ( + G_CALLBACK (gtk_widget_destroy), + file_dialog, + NULL), + 0); gtk_window_set_position (GTK_WINDOW (file_dialog), GTK_WIN_POS_MOUSE); gtk_window_set_wmclass (GTK_WINDOW (file_dialog), "file_selector", "Nautilus"); @@ -1399,7 +1404,7 @@ xpm_label_box (NautilusMusicView *music_view, char * xpm_data[]) GtkStyle *style; box = gtk_hbox_new (FALSE, 0); - gtk_container_border_width (GTK_CONTAINER (box), 2); + gtk_container_set_border_width (GTK_CONTAINER (box), 2); style = gtk_widget_get_style (GTK_WIDGET (music_view->details->event_box)); pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)xpm_data); @@ -1426,7 +1431,7 @@ xpm_dual_label_box (NautilusMusicView *music_view, char * xpm_data[], box = gtk_hbox_new (FALSE, 0); - gtk_container_border_width (GTK_CONTAINER (box), 2); + gtk_container_set_border_width (GTK_CONTAINER (box), 2); style = gtk_widget_get_style (GTK_WIDGET (music_view->details->event_box)); @@ -1767,11 +1772,13 @@ nautilus_music_view_update (NautilusMusicView *music_view) /* determine the album title/artist line */ if (music_view->details->album_title) { - char *album_name, *artist_name, *temp_str; + char *basename, *album_name, *artist_name, *temp_str; album_name = determine_attribute (song_list, FALSE); if (album_name == NULL) { - album_name = g_strdup (gnome_vfs_unescape_string_for_display (g_basename (uri))); + album_name = gnome_vfs_unescape_string_for_display ( + basename = g_path_get_basename (uri)); + g_free (basename); } artist_name = determine_attribute (song_list, TRUE); |