Mercurial > audlegacy-plugins
annotate src/streambrowser/streambrowser.c @ 2913:113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
| author | Calin Crisan ccrisan@gmail.com |
|---|---|
| date | Fri, 15 Aug 2008 16:00:43 +0200 |
| parents | c27da2c06805 |
| children | 703cd5256849 |
| rev | line source |
|---|---|
| 2811 | 1 /* |
| 2 * Audacious Streambrowser Plugin | |
| 3 * | |
| 4 * Copyright (c) 2008 Calin Crisan <ccrisan@gmail.com> | |
| 5 * | |
| 6 * This program is free software; you can redistribute it and/or modify | |
| 7 * it under the terms of the GNU General Public License as published by | |
| 8 * the Free Software Foundation; under version 3 of the License. | |
| 9 * | |
| 10 * This program is distributed in the hope that it will be useful, | |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 * GNU General Public License for more details. | |
| 14 * | |
| 15 * You should have received a copy of the GNU General Public License | |
| 16 * along with this program. If not, see <http://www.gnu.org/licenses>. | |
| 17 */ | |
| 18 | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
19 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
20 #include <stdlib.h> |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
21 #include <gtk/gtk.h> |
| 2891 | 22 #include <glib.h> |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
23 #include <audacious/plugin.h> |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
24 #include <audacious/ui_plugin_menu.h> |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
25 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
26 #include "streambrowser.h" |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
27 #include "streamdir.h" |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
28 #include "shoutcast.h" |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
29 #include "xiph.h" |
| 2891 | 30 #include "bookmarks.h" |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
31 #include "gui/streambrowser_win.h" |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
32 #include "gui/about_win.h" |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
33 |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
34 |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
35 typedef struct { |
| 2891 | 36 |
| 37 gboolean debug; | |
| 38 bookmark_t *bookmarks; | |
| 39 int bookmarks_count; | |
| 40 | |
| 41 } streambrowser_cfg_t; | |
| 42 | |
| 43 typedef struct { | |
| 44 | |
| 2788 | 45 streamdir_t *streamdir; |
| 46 category_t *category; | |
| 47 streaminfo_t *streaminfo; | |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
48 gboolean add_to_playlist; |
| 2891 | 49 |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
50 } update_thread_data_t; |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
51 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
52 |
| 2788 | 53 static void sb_init(); |
| 54 static void sb_about(); | |
| 55 static void sb_configure(); | |
| 56 static void sb_cleanup(); | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
57 |
| 2788 | 58 static void gui_init(); |
| 59 static void gui_done(); | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
60 |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
61 static void streamdir_update(streamdir_t *streamdir, category_t *category, streaminfo_t *streaminfo, gboolean add_to_playlist); |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
62 static gpointer update_thread_core(gpointer user_data); |
| 2788 | 63 static void streaminfo_add_to_playlist(streaminfo_t *streaminfo); |
| 64 static void on_plugin_services_menu_item_click(); | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
65 |
| 2788 | 66 static GtkWidget *playlist_menu_item; |
| 67 static GtkWidget *main_menu_item; | |
| 68 static GQueue *update_thread_data_queue = NULL; | |
| 69 static GMutex *update_thread_mutex = NULL; | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
70 |
| 2788 | 71 streambrowser_cfg_t streambrowser_cfg; |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
72 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
73 static GeneralPlugin sb_plugin = |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
74 { |
| 2788 | 75 .description = "Stream Browser", |
| 76 .init = sb_init, | |
| 77 .about = sb_about, | |
| 78 .configure = sb_configure, | |
| 79 .cleanup = sb_cleanup | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
80 }; |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
81 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
82 GeneralPlugin *sb_gplist[] = |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
83 { |
| 2788 | 84 &sb_plugin, |
| 85 NULL | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
86 }; |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
87 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
88 SIMPLE_GENERAL_PLUGIN(streambrowser, sb_gplist); |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
89 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
90 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
91 void debug(const char *fmt, ...) |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
92 { |
| 2788 | 93 if (streambrowser_cfg.debug) { |
| 94 va_list ap; | |
| 95 fprintf(stderr, "* streambrowser: "); | |
| 96 va_start(ap, fmt); | |
| 97 vfprintf(stderr, fmt, ap); | |
| 98 va_end(ap); | |
| 99 } | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
100 } |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
101 |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
102 void failure(const char *fmt, ...) |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
103 { |
| 2788 | 104 va_list ap; |
| 105 fprintf(stderr, "! streambrowser: "); | |
| 106 va_start(ap, fmt); | |
| 107 vfprintf(stderr, fmt, ap); | |
| 108 va_end(ap); | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
109 } |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
110 |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
111 gboolean fetch_remote_to_local_file(gchar *remote_url, gchar *local_url) |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
112 { |
| 2788 | 113 VFSFile *remote_file = aud_vfs_fopen(remote_url, "r"); |
| 114 if (remote_file == NULL) { | |
| 115 failure("failed to fetch file '%s'\n", remote_url); | |
| 116 return FALSE; | |
| 117 } | |
| 118 | |
| 119 VFSFile *local_file = aud_vfs_fopen(local_url, "w"); | |
| 120 if (local_file == NULL) { | |
| 121 aud_vfs_fclose(remote_file); | |
| 122 | |
| 123 failure("failed to create local file '%s'\n", local_file); | |
| 124 return FALSE; | |
| 125 } | |
| 126 | |
| 127 unsigned char buff[DEF_BUFFER_SIZE]; | |
| 128 int size; | |
| 129 while (!aud_vfs_feof(remote_file)) { | |
| 130 size = aud_vfs_fread(buff, 1, DEF_BUFFER_SIZE, remote_file); | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
131 |
| 2788 | 132 // i don't know why aud_vfs_feof() doesn't ever return TRUE |
| 133 // so this is a workaround to properly end the loop | |
| 134 if (size == 0) | |
| 135 break; | |
| 136 | |
| 137 size = aud_vfs_fwrite(buff, 1, size, local_file); | |
| 138 if (size == 0) { | |
| 139 aud_vfs_fclose(local_file); | |
| 140 aud_vfs_fclose(remote_file); | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
141 |
| 2788 | 142 failure("failed to write to local file '%s'\n", local_file); |
| 143 return FALSE; | |
| 144 } | |
| 145 } | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
146 |
| 2788 | 147 aud_vfs_fclose(local_file); |
| 148 aud_vfs_fclose(remote_file); | |
| 149 | |
| 150 return TRUE; | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
151 } |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
152 |
|
2913
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
153 void config_load() |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
154 { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
155 streambrowser_cfg.debug = FALSE; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
156 streambrowser_cfg.bookmarks = NULL; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
157 streambrowser_cfg.bookmarks_count = 0; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
158 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
159 mcs_handle_t *db; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
160 if ((db = aud_cfg_db_open()) == NULL) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
161 failure("failed to load configuration\n"); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
162 return; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
163 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
164 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
165 aud_cfg_db_get_bool(db, "streambrowser", "debug", &streambrowser_cfg.debug); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
166 aud_cfg_db_get_int(db, "streambrowser", "bookmarks_count", &streambrowser_cfg.bookmarks_count); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
167 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
168 debug("debug = %d\n", streambrowser_cfg.debug); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
169 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
170 if (streambrowser_cfg.bookmarks_count == 0) |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
171 streambrowser_cfg.bookmarks = NULL; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
172 else |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
173 streambrowser_cfg.bookmarks = g_malloc(sizeof(bookmark_t) * streambrowser_cfg.bookmarks_count); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
174 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
175 int i; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
176 gchar item[DEF_STRING_LEN]; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
177 gchar *value; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
178 for (i = 0; i < streambrowser_cfg.bookmarks_count; i++) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
179 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_streamdir_name", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
180 if (aud_cfg_db_get_string(db, "streambrowser", item, &value)) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
181 strncpy(streambrowser_cfg.bookmarks[i].streamdir_name, value, DEF_STRING_LEN); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
182 g_free(value); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
183 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
184 else |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
185 streambrowser_cfg.bookmarks[i].streamdir_name[0] = '\0'; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
186 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
187 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_name", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
188 if (aud_cfg_db_get_string(db, "streambrowser", item, &value)) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
189 strncpy(streambrowser_cfg.bookmarks[i].name, value, DEF_STRING_LEN); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
190 g_free(value); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
191 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
192 else |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
193 streambrowser_cfg.bookmarks[i].name[0] = '\0'; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
194 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
195 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_playlist_url", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
196 if (aud_cfg_db_get_string(db, "streambrowser", item, &value)) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
197 strncpy(streambrowser_cfg.bookmarks[i].playlist_url, value, DEF_STRING_LEN); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
198 g_free(value); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
199 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
200 else |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
201 streambrowser_cfg.bookmarks[i].playlist_url[0] = '\0'; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
202 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
203 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_url", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
204 if (aud_cfg_db_get_string(db, "streambrowser", item, &value)) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
205 strncpy(streambrowser_cfg.bookmarks[i].url, value, DEF_STRING_LEN); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
206 g_free(value); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
207 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
208 else |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
209 streambrowser_cfg.bookmarks[i].url[0] = '\0'; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
210 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
211 debug("loaded a bookmark with streamdir_name = '%s', name = '%s', playlist_url = '%s', url = '%s'\n", |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
212 streambrowser_cfg.bookmarks[i].streamdir_name, |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
213 streambrowser_cfg.bookmarks[i].name, |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
214 streambrowser_cfg.bookmarks[i].playlist_url, |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
215 streambrowser_cfg.bookmarks[i].url); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
216 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
217 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
218 debug("loaded %d bookmarks\n", streambrowser_cfg.bookmarks_count); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
219 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
220 aud_cfg_db_close(db); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
221 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
222 debug("configuration loaded\n"); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
223 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
224 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
225 void config_save() |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
226 { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
227 mcs_handle_t *db; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
228 if ((db = aud_cfg_db_open()) == NULL) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
229 failure("failed to save configuration\n"); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
230 return; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
231 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
232 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
233 aud_cfg_db_set_bool(db, "streambrowser", "debug", streambrowser_cfg.debug); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
234 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
235 int old_bookmarks_count, i; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
236 gchar item[DEF_STRING_LEN]; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
237 aud_cfg_db_get_int(db, "streambrowser", "bookmarks_count", &old_bookmarks_count); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
238 aud_cfg_db_set_int(db, "streambrowser", "bookmarks_count", streambrowser_cfg.bookmarks_count); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
239 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
240 for (i = 0; i < streambrowser_cfg.bookmarks_count; i++) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
241 debug("saving bookmark with streamdir_name = '%s', name = '%s', playlist_url = '%s', url = '%s'\n", |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
242 streambrowser_cfg.bookmarks[i].streamdir_name, |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
243 streambrowser_cfg.bookmarks[i].name, |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
244 streambrowser_cfg.bookmarks[i].playlist_url, |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
245 streambrowser_cfg.bookmarks[i].url); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
246 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
247 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_streamdir_name", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
248 aud_cfg_db_set_string(db, "streambrowser", item, streambrowser_cfg.bookmarks[i].streamdir_name); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
249 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
250 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_name", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
251 aud_cfg_db_set_string(db, "streambrowser", item, streambrowser_cfg.bookmarks[i].name); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
252 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
253 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_playlist_url", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
254 aud_cfg_db_set_string(db, "streambrowser", item, streambrowser_cfg.bookmarks[i].playlist_url); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
255 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
256 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_url", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
257 aud_cfg_db_set_string(db, "streambrowser", item, streambrowser_cfg.bookmarks[i].url); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
258 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
259 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
260 for (i = streambrowser_cfg.bookmarks_count; i < old_bookmarks_count; i++) { |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
261 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_streamdir_name", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
262 aud_cfg_db_unset_key(db, "streambrowser", item); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
263 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
264 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_name", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
265 aud_cfg_db_unset_key(db, "streambrowser", item); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
266 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
267 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_playlist_url", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
268 aud_cfg_db_unset_key(db, "streambrowser", item); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
269 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
270 g_snprintf(item, DEF_STRING_LEN, "bookmark%d_url", i); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
271 aud_cfg_db_unset_key(db, "streambrowser", item); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
272 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
273 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
274 aud_cfg_db_close(db); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
275 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
276 debug("configuration saved\n"); |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
277 } |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
278 |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
279 gboolean mystrcasestr(const char *haystack, const char *needle) |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
280 { |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
281 int len_h = strlen(haystack) + 1; |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
282 int len_n = strlen(needle) + 1; |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
283 int i; |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
284 |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
285 char *upper_h = malloc(len_h); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
286 char *upper_n = malloc(len_n); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
287 |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
288 for (i = 0; i < len_h; i++) |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
289 upper_h[i] = toupper(haystack[i]); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
290 for (i = 0; i < len_n; i++) |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
291 upper_n[i] = toupper(needle[i]); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
292 |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
293 char *p = strstr(upper_h, upper_n); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
294 |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
295 free(upper_h); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
296 free(upper_n); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
297 |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
298 return (gboolean) p; |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
299 } |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
300 |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
301 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
302 static void sb_init() |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
303 { |
| 2788 | 304 /* workaround to print sb_init() */ |
| 305 streambrowser_cfg.debug = TRUE; | |
| 306 debug("sb_init()\n"); | |
| 307 streambrowser_cfg.debug = FALSE; | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
308 |
| 2788 | 309 config_load(); |
| 310 gui_init(); | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
311 } |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
312 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
313 static void sb_about() |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
314 { |
| 2788 | 315 debug("sb_about()\n"); |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
316 } |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
317 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
318 static void sb_configure() |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
319 { |
| 2788 | 320 debug("sb_configure()\n"); |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
321 } |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
322 |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
323 static void sb_cleanup() |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
324 { |
| 2788 | 325 debug("sb_cleanup()\n"); |
| 326 | |
| 327 gui_done(); | |
| 328 config_save(); | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
329 } |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
330 |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
331 static void gui_init() |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
332 { |
| 2788 | 333 /* the plugin services menu */ |
|
2790
c156102069ae
background fetching of streaming info is now indicated in gui
Calin Crisan ccrisan@gmail.com
parents:
2788
diff
changeset
|
334 playlist_menu_item = gtk_image_menu_item_new_with_label(_("Streambrowser")); |
|
2791
f9c6a9cb442e
streambrowser has now an icon
Calin Crisan ccrisan@gmail.com
parents:
2790
diff
changeset
|
335 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(playlist_menu_item), gtk_image_new_from_file(STREAMBROWSER_ICON_SMALL)); |
| 2788 | 336 gtk_widget_show(playlist_menu_item); |
| 337 g_signal_connect(G_OBJECT(playlist_menu_item), "activate", G_CALLBACK(on_plugin_services_menu_item_click), NULL); | |
| 338 audacious_menu_plugin_item_add(AUDACIOUS_MENU_PLAYLIST_RCLICK, playlist_menu_item); | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
339 |
|
2790
c156102069ae
background fetching of streaming info is now indicated in gui
Calin Crisan ccrisan@gmail.com
parents:
2788
diff
changeset
|
340 main_menu_item = gtk_image_menu_item_new_with_label(_("Streambrowser")); |
|
2791
f9c6a9cb442e
streambrowser has now an icon
Calin Crisan ccrisan@gmail.com
parents:
2790
diff
changeset
|
341 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(main_menu_item), gtk_image_new_from_file(STREAMBROWSER_ICON_SMALL)); |
| 2788 | 342 gtk_widget_show(main_menu_item); |
| 343 g_signal_connect(G_OBJECT(main_menu_item), "activate", G_CALLBACK(on_plugin_services_menu_item_click), NULL); | |
| 344 audacious_menu_plugin_item_add(AUDACIOUS_MENU_MAIN, main_menu_item); | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
345 |
| 2788 | 346 /* main streambrowser window */ |
| 347 streambrowser_win_init(); | |
| 348 streambrowser_win_set_update_function(streamdir_update); | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
349 |
| 2788 | 350 /* others */ |
| 351 update_thread_mutex = g_mutex_new(); | |
| 352 update_thread_data_queue = g_queue_new(); | |
| 353 | |
| 354 debug("gui initialized\n"); | |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
355 } |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
356 |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
357 static void gui_done() |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
358 { |
| 2788 | 359 /* the plugin services menu */ |
| 360 audacious_menu_plugin_item_remove(AUDACIOUS_MENU_PLAYLIST_RCLICK, playlist_menu_item); | |
| 361 audacious_menu_plugin_item_remove(AUDACIOUS_MENU_MAIN, main_menu_item); | |
| 362 | |
| 363 /* main streambrowser window */ | |
| 364 streambrowser_win_hide(); | |
| 365 streambrowser_win_done(); | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
366 |
| 2788 | 367 /* others */ |
| 368 if (update_thread_mutex) | |
| 369 g_mutex_free(update_thread_mutex); | |
| 370 update_thread_mutex = NULL; | |
| 371 if (update_thread_data_queue) | |
| 372 g_queue_free(update_thread_data_queue); | |
| 373 update_thread_data_queue = NULL; | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
374 |
| 2788 | 375 debug("gui destroyed\n"); |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
376 } |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
377 |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
378 static void streamdir_update(streamdir_t *streamdir, category_t *category, streaminfo_t *streaminfo, gboolean add_to_playlist) |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
379 { |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
380 debug("requested streamdir update (streamdir = '%s', category = '%s', streaminfo = '%s', add_to_playlist = %d)\n", |
| 2788 | 381 streamdir == NULL ? "" : streamdir->name, |
| 382 category == NULL ? "" : category->name, | |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
383 streaminfo == NULL ? "" : streaminfo->name, |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
384 add_to_playlist); |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
385 |
|
2817
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
386 if (g_queue_get_length(update_thread_data_queue) >= MAX_UPDATE_THREADS) { |
|
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
387 debug("another %d streamdir updates are pending, this request will be dropped\n", g_queue_get_length(update_thread_data_queue)); |
| 2788 | 388 } |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
389 else { |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
390 g_mutex_lock(update_thread_mutex); |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
391 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
392 /* do we have a running thread? */ |
|
2817
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
393 if (g_queue_get_length(update_thread_data_queue) > 0) { |
| 2788 | 394 int i; |
| 395 gboolean exists = FALSE; | |
| 396 update_thread_data_t *update_thread_data; | |
| 397 | |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
398 /* search for another identic update request */ |
| 2788 | 399 for (i = 0; i < g_queue_get_length(update_thread_data_queue); i++) { |
| 400 update_thread_data = g_queue_peek_nth(update_thread_data_queue, i); | |
| 401 if (update_thread_data->streamdir == streamdir && | |
| 402 update_thread_data->category == category && | |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
403 update_thread_data->streaminfo == streaminfo && |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
404 update_thread_data->add_to_playlist == add_to_playlist) { |
| 2788 | 405 exists = TRUE; |
| 406 break; | |
| 407 } | |
| 408 } | |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
409 |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
410 /* if no other similar request exists, we enqueue it */ |
| 2788 | 411 if (!exists) { |
|
2817
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
412 debug("another %d streamdir updates are pending, this request will be queued\n", g_queue_get_length(update_thread_data_queue)); |
| 2788 | 413 |
| 414 update_thread_data = g_malloc(sizeof(update_thread_data_t)); | |
| 415 | |
| 416 update_thread_data->streamdir = streamdir; | |
| 417 update_thread_data->category = category; | |
| 418 update_thread_data->streaminfo = streaminfo; | |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
419 update_thread_data->add_to_playlist = add_to_playlist; |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
420 |
| 2788 | 421 g_queue_push_tail(update_thread_data_queue, update_thread_data); |
| 422 } | |
| 423 else { | |
| 424 debug("this request is already present in the queue, dropping\n"); | |
| 425 } | |
| 426 } | |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
427 /* no thread is currently running, we start one */ |
| 2788 | 428 else { |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
429 debug("no other streamdir updates are pending, starting to process this request immediately\n"); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
430 |
| 2788 | 431 update_thread_data_t *data = g_malloc(sizeof(update_thread_data_t)); |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
432 |
| 2788 | 433 data->streamdir = streamdir; |
| 434 data->category = category; | |
| 435 data->streaminfo = streaminfo; | |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
436 data->add_to_playlist = add_to_playlist; |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
437 |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
438 g_queue_push_tail(update_thread_data_queue, data); |
| 2788 | 439 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
440 g_thread_create((GThreadFunc) update_thread_core, NULL, FALSE, NULL); |
| 2788 | 441 } |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
442 |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
443 g_mutex_unlock(update_thread_mutex); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
444 } |
|
2570
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
445 } |
|
28498c0bde64
Initial commit for the streambrowser plugin
Calin Crisan ccrisan@gmail.com
parents:
diff
changeset
|
446 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
447 static gpointer update_thread_core(gpointer user_data) |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
448 { |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
449 debug("entering update thread core\n"); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
450 |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
451 /* try to get the last item in the queue, but don't remove it */ |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
452 g_mutex_lock(update_thread_mutex); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
453 update_thread_data_t *data = NULL; |
|
2817
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
454 if (g_queue_get_length(update_thread_data_queue) > 0) { |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
455 data = g_queue_peek_head(update_thread_data_queue); |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
456 } |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
457 g_mutex_unlock(update_thread_mutex); |
| 2788 | 458 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
459 /* repetitively process the queue elements, until queue is empty */ |
|
2817
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
460 while (data != NULL && g_queue_get_length(update_thread_data_queue) > 0) { |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
461 /* update a streaminfo */ |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
462 if (data->streaminfo != NULL) { |
|
2797
11fb1503ee4b
double click adds stream to playlist; visual feedback when adding streams
Calin Crisan ccrisan@gmail.com
parents:
2795
diff
changeset
|
463 gdk_threads_enter(); |
|
11fb1503ee4b
double click adds stream to playlist; visual feedback when adding streams
Calin Crisan ccrisan@gmail.com
parents:
2795
diff
changeset
|
464 streambrowser_win_set_streaminfo_state(data->streamdir, data->category, data->streaminfo, TRUE); |
|
11fb1503ee4b
double click adds stream to playlist; visual feedback when adding streams
Calin Crisan ccrisan@gmail.com
parents:
2795
diff
changeset
|
465 gdk_threads_leave(); |
|
11fb1503ee4b
double click adds stream to playlist; visual feedback when adding streams
Calin Crisan ccrisan@gmail.com
parents:
2795
diff
changeset
|
466 |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
467 if (data->add_to_playlist) |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
468 streaminfo_add_to_playlist(data->streaminfo); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
469 else { |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
470 /* shoutcast */ |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
471 if (strncmp(data->streamdir->name, SHOUTCAST_NAME, strlen(SHOUTCAST_NAME)) == 0) { |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
472 shoutcast_streaminfo_fetch(data->category, data->streaminfo); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
473 } |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
474 /* xiph */ |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
475 else if (strncmp(data->streamdir->name, XIPH_NAME, strlen(XIPH_NAME)) == 0) { |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
476 xiph_streaminfo_fetch(data->category, data->streaminfo); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
477 } |
| 2891 | 478 /* bookmarks */ |
| 479 else if (strncmp(data->streamdir->name, BOOKMARKS_NAME, strlen(BOOKMARKS_NAME)) == 0) { | |
| 480 bookmarks_streaminfo_fetch(data->category, data->streaminfo); | |
| 481 } | |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
482 } |
|
2797
11fb1503ee4b
double click adds stream to playlist; visual feedback when adding streams
Calin Crisan ccrisan@gmail.com
parents:
2795
diff
changeset
|
483 |
|
11fb1503ee4b
double click adds stream to playlist; visual feedback when adding streams
Calin Crisan ccrisan@gmail.com
parents:
2795
diff
changeset
|
484 gdk_threads_enter(); |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
485 if (!data->add_to_playlist) |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
486 streambrowser_win_set_streaminfo(data->streamdir, data->category, data->streaminfo); |
|
2797
11fb1503ee4b
double click adds stream to playlist; visual feedback when adding streams
Calin Crisan ccrisan@gmail.com
parents:
2795
diff
changeset
|
487 streambrowser_win_set_streaminfo_state(data->streamdir, data->category, data->streaminfo, FALSE); |
|
11fb1503ee4b
double click adds stream to playlist; visual feedback when adding streams
Calin Crisan ccrisan@gmail.com
parents:
2795
diff
changeset
|
488 gdk_threads_leave(); |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
489 } |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
490 /* update a category */ |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
491 else if (data->category != NULL) { |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
492 gdk_threads_enter(); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
493 streambrowser_win_set_category_state(data->streamdir, data->category, TRUE); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
494 gdk_threads_leave(); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
495 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
496 /* shoutcast */ |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
497 if (strncmp(data->streamdir->name, SHOUTCAST_NAME, strlen(SHOUTCAST_NAME)) == 0) { |
| 2891 | 498 shoutcast_category_fetch(data->streamdir, data->category); |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
499 } |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
500 /* xiph */ |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
501 else if (strncmp(data->streamdir->name, XIPH_NAME, strlen(XIPH_NAME)) == 0) { |
| 2891 | 502 xiph_category_fetch(data->streamdir, data->category); |
| 503 } | |
| 504 /* bookmarks */ | |
| 505 else if (strncmp(data->streamdir->name, BOOKMARKS_NAME, strlen(BOOKMARKS_NAME)) == 0) { | |
| 506 bookmarks_category_fetch(data->streamdir, data->category); | |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
507 } |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
508 |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
509 gdk_threads_enter(); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
510 streambrowser_win_set_category(data->streamdir, data->category); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
511 streambrowser_win_set_category_state(data->streamdir, data->category, FALSE); |
|
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
512 gdk_threads_leave(); |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
513 } |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
514 /* update a streamdir */ |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
515 else if (data->streamdir != NULL) { |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
516 /* shoutcast */ |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
517 if (strncmp(data->streamdir->name, SHOUTCAST_NAME, strlen(SHOUTCAST_NAME)) == 0) { |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
518 streamdir_t *streamdir = shoutcast_streamdir_fetch(); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
519 if (streamdir != NULL) { |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
520 gdk_threads_enter(); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
521 streambrowser_win_set_streamdir(streamdir, SHOUTCAST_ICON); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
522 gdk_threads_leave(); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
523 } |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
524 } |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
525 /* xiph */ |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
526 else if (strncmp(data->streamdir->name, XIPH_NAME, strlen(XIPH_NAME)) == 0) { |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
527 streamdir_t *streamdir = xiph_streamdir_fetch(); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
528 if (streamdir != NULL) { |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
529 gdk_threads_enter(); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
530 streambrowser_win_set_streamdir(streamdir, XIPH_ICON); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
531 gdk_threads_leave(); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
532 } |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
533 } |
| 2891 | 534 /* bookmarks */ |
| 535 else if (strncmp(data->streamdir->name, BOOKMARKS_NAME, strlen(BOOKMARKS_NAME)) == 0) { | |
|
2913
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
536 streamdir_t *streamdir = bookmarks_streamdir_fetch(&streambrowser_cfg.bookmarks, &streambrowser_cfg.bookmarks_count); |
| 2891 | 537 if (streamdir != NULL) { |
| 538 gdk_threads_enter(); | |
| 539 streambrowser_win_set_streamdir(streamdir, BOOKMARKS_ICON); | |
| 540 gdk_threads_leave(); | |
| 541 } | |
| 542 } | |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
543 } |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
544 /* update all streamdirs */ |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
545 else { |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
546 /* shoutcast */ |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
547 streamdir_t *streamdir = shoutcast_streamdir_fetch(); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
548 if (streamdir != NULL) { |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
549 gdk_threads_enter(); |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
550 streambrowser_win_set_streamdir(streamdir, SHOUTCAST_ICON); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
551 gdk_threads_leave(); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
552 } |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
553 /* xiph */ |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
554 streamdir = xiph_streamdir_fetch(); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
555 if (streamdir != NULL) { |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
556 gdk_threads_enter(); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
557 streambrowser_win_set_streamdir(streamdir, XIPH_ICON); |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
558 gdk_threads_leave(); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
559 } |
| 2891 | 560 /* bookmarks */ |
|
2913
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
561 streamdir = bookmarks_streamdir_fetch(&streambrowser_cfg.bookmarks, &streambrowser_cfg.bookmarks_count); |
| 2891 | 562 if (streamdir != NULL) { |
| 563 gdk_threads_enter(); | |
| 564 streambrowser_win_set_streamdir(streamdir, BOOKMARKS_ICON); | |
| 565 gdk_threads_leave(); | |
|
2913
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
566 |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
567 int i; |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
568 for (i = 0; i < category_get_count(streamdir); i++) |
|
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
569 streamdir_update(streamdir, category_get_by_index(streamdir, i), NULL, FALSE); |
| 2891 | 570 } |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
571 } |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
572 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
573 g_free(data); |
| 2788 | 574 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
575 g_mutex_lock(update_thread_mutex); |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
576 |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
577 /* remove the just processed data from the queue */ |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
578 g_queue_pop_head(update_thread_data_queue); |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
579 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
580 /* try to get the last item in the queue */ |
|
2817
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
581 if (g_queue_get_length(update_thread_data_queue) > 0) |
|
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
582 data = g_queue_peek_head(update_thread_data_queue); |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
583 else |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
584 data = NULL; |
|
2817
779125caa3ac
added xiph icon; smaller icons for streamdirs; fetch queue fix; up/down keys in tree view no longer focus the search entry
Calin Crisan ccrisan@gmail.com
parents:
2815
diff
changeset
|
585 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
586 g_mutex_unlock(update_thread_mutex); |
|
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
587 } |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
588 |
|
2795
4c9db0b2194f
added strcasestr implementation; improved searching and updating
Calin Crisan ccrisan@gmail.com
parents:
2791
diff
changeset
|
589 debug("leaving update thread core\n"); |
| 2788 | 590 |
| 591 return NULL; | |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
592 } |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
593 |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
594 static void streaminfo_add_to_playlist(streaminfo_t *streaminfo) |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
595 { |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
596 if (strlen(streaminfo->playlist_url) > 0) { |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
597 debug("fetching stream playlist for station '%s' from '%s'\n", streaminfo->name, streaminfo->playlist_url); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
598 if (!fetch_remote_to_local_file(streaminfo->playlist_url, PLAYLIST_TEMP_FILE)) { |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
599 failure("shoutcast: stream playlist '%s' could not be downloaded to '%s'\n", streaminfo->playlist_url, PLAYLIST_TEMP_FILE); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
600 return; |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
601 } |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
602 debug("stream playlist '%s' successfuly downloaded to '%s'\n", streaminfo->playlist_url, PLAYLIST_TEMP_FILE); |
| 2788 | 603 |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
604 aud_playlist_add(aud_playlist_get_active(), PLAYLIST_TEMP_FILE); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
605 debug("stream playlist '%s' added\n", streaminfo->playlist_url); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
606 } |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
607 |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
608 if (strlen(streaminfo->url) > 0) { |
|
2889
6c53f9fa9029
Backed out changeset 59ff744e1e23
Matti Hamalainen <ccr@tnsp.org>
parents:
2817
diff
changeset
|
609 aud_playlist_add(aud_playlist_get_active(), streaminfo->url); |
|
2815
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
610 debug("stream '%s' added\n", streaminfo->url); |
|
cc6f02424609
added initial support for xiph streaming directory; small bug fixes & code cleanups
Calin Crisan ccrisan@gmail.com
parents:
2811
diff
changeset
|
611 } |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
612 } |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
613 |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
614 static void on_plugin_services_menu_item_click() |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
615 { |
|
2913
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
616 debug("on_plugin_services_menu_item_click()\n"); |
| 2788 | 617 |
| 618 streambrowser_win_show(); | |
|
2913
113454baecf8
lots of changes: most important - bookmarks code almost finished, fixed bold-text gui bug, and others...
Calin Crisan ccrisan@gmail.com
parents:
2891
diff
changeset
|
619 streamdir_update(NULL, NULL, NULL, FALSE); |
|
2735
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
620 } |
|
6d6a3eb67510
some work on the streambrowser
Calin Crisan ccrisan@gmail.com
parents:
2570
diff
changeset
|
621 |
