comparison Plugins/General/scrobbler/xmms_scrobbler.c @ 1187:4c58ab006563 trunk

[svn] - remove the preferences UI on unload
author nenolod
date Sun, 11 Jun 2006 23:38:50 -0700
parents 1eef4fd1aeb5
children 22707aa5ea6f
comparison
equal deleted inserted replaced
1186:d7848ff5bbe5 1187:4c58ab006563
37 static void init(void); 37 static void init(void);
38 static void cleanup(void); 38 static void cleanup(void);
39 static void *xs_thread(void *); 39 static void *xs_thread(void *);
40 static void *hs_thread(void *); 40 static void *hs_thread(void *);
41 static int going; 41 static int going;
42 static gint sc_id;
42 43
43 static GThread *pt_scrobbler; 44 static GThread *pt_scrobbler;
44 static GMutex *m_scrobbler; 45 static GMutex *m_scrobbler;
45 static GThread *pt_handshake; 46 static GThread *pt_handshake;
46 47
62 ConfigDb *cfgfile; 63 ConfigDb *cfgfile;
63 going = 1; 64 going = 1;
64 GError **moo = NULL; 65 GError **moo = NULL;
65 GtkWidget *cfgdlg = create_cfgdlg(); 66 GtkWidget *cfgdlg = create_cfgdlg();
66 67
67 prefswin_page_new(cfgdlg, "Last.FM Client", DATA_DIR "/images/audioscrobbler.png"); 68 sc_id = prefswin_page_new(cfgdlg, "Last.FM", DATA_DIR "/images/audioscrobbler.png");
68 69
69 if ((cfgfile = bmp_cfg_db_open()) != NULL) { 70 if ((cfgfile = bmp_cfg_db_open()) != NULL) {
70 bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "username", 71 bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "username",
71 &username); 72 &username);
72 bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "password", 73 bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "password",
110 g_mutex_unlock(m_scrobbler); 111 g_mutex_unlock(m_scrobbler);
111 pdebug("joining threads", DEBUG); 112 pdebug("joining threads", DEBUG);
112 g_thread_join(pt_scrobbler); 113 g_thread_join(pt_scrobbler);
113 114
114 g_thread_join(pt_handshake); 115 g_thread_join(pt_handshake);
116
117 prefswin_page_destroy(sc_id);
115 118
116 sc_cleaner(); 119 sc_cleaner();
117 } 120 }
118 121
119 static char ishttp(const char *a) 122 static char ishttp(const char *a)