pidgin/libpidgin.c

branch
gtk4
changeset 41539
447daf762aee
parent 41517
5bafe75d3907
child 41723
124c95083fad
equal deleted inserted replaced
41538:48e7927980ec 41539:447daf762aee
151 } 151 }
152 #endif /* !_WIN32 */ 152 #endif /* !_WIN32 */
153 153
154 static void 154 static void
155 purple_ui_add_protocol_theme_paths(PurpleProtocol *protocol) { 155 purple_ui_add_protocol_theme_paths(PurpleProtocol *protocol) {
156 GdkDisplay *display = NULL;
156 GtkIconTheme *theme = NULL; 157 GtkIconTheme *theme = NULL;
157 const gchar *path = NULL; 158 const gchar *path = NULL;
158 159
159 theme = gtk_icon_theme_get_default(); 160 display = gdk_display_get_default();
161
162 theme = gtk_icon_theme_get_for_display(display);
160 163
161 path = purple_protocol_get_icon_search_path(protocol); 164 path = purple_protocol_get_icon_search_path(protocol);
162 if(path != NULL) { 165 if(path != NULL) {
163 gtk_icon_theme_prepend_search_path(theme, path); 166 gtk_icon_theme_add_search_path(theme, path);
164 } 167 }
165 168
166 path = purple_protocol_get_icon_resource_path(protocol); 169 path = purple_protocol_get_icon_resource_path(protocol);
167 if(path != NULL) { 170 if(path != NULL) {
168 gtk_icon_theme_add_resource_path(theme, path); 171 gtk_icon_theme_add_resource_path(theme, path);
217 220
218 static void 221 static void
219 pidgin_ui_init(void) 222 pidgin_ui_init(void)
220 { 223 {
221 PurpleProtocolManager *protocol_manager = NULL; 224 PurpleProtocolManager *protocol_manager = NULL;
225 GdkDisplay *display = NULL;
222 GtkIconTheme *theme = NULL; 226 GtkIconTheme *theme = NULL;
223 GError *error = NULL; 227 GError *error = NULL;
224 gchar *path; 228 gchar *path;
225 229
226 pidgin_debug_init(); 230 pidgin_debug_init();
227 231
228 theme = gtk_icon_theme_get_default(); 232 display = gdk_display_get_default();
233 theme = gtk_icon_theme_get_for_display(display);
229 234
230 path = g_build_filename(PURPLE_DATADIR, "pidgin", "icons", NULL); 235 path = g_build_filename(PURPLE_DATADIR, "pidgin", "icons", NULL);
231 gtk_icon_theme_prepend_search_path(theme, path); 236 gtk_icon_theme_add_search_path(theme, path);
232 g_free(path); 237 g_free(path);
233 238
234 /* Add a callback for when a protocol is registered to add its icon paths 239 /* Add a callback for when a protocol is registered to add its icon paths
235 * if it was found after initial startup. 240 * if it was found after initial startup.
236 */ 241 */

mercurial