comparison pidgin/pidginstock.c @ 30929:6fc4df1d12a8

merge of '04e7c54608e551322192b750ca2921f5b39b993c' and '703be8eb5c824820de34dd527c0c8aa3958f91ee'
author Marcus Lundblad <ml@update.uu.se>
date Mon, 21 Sep 2009 20:58:12 +0000
parents 60ab4bdea3c3
children 6e9917e067e6 b1284d63b969
comparison
equal deleted inserted replaced
30928:b689be519aa6 30929:6fc4df1d12a8
581 stock_initted = TRUE; 581 stock_initted = TRUE;
582 582
583 /* Setup the status icon theme */ 583 /* Setup the status icon theme */
584 loader = g_object_new(PIDGIN_TYPE_ICON_THEME_LOADER, "type", "status-icon", NULL); 584 loader = g_object_new(PIDGIN_TYPE_ICON_THEME_LOADER, "type", "status-icon", NULL);
585 purple_theme_manager_register_type(PURPLE_THEME_LOADER(loader)); 585 purple_theme_manager_register_type(PURPLE_THEME_LOADER(loader));
586 purple_prefs_add_none(PIDGIN_PREFS_ROOT "/status");
586 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/status/icon-theme", ""); 587 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/status/icon-theme", "");
587 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/status/icon-theme-dir", ""); 588 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/status/icon-theme-dir", "");
588 589
589 stockloader = g_object_new(PIDGIN_TYPE_ICON_THEME_LOADER, "type", "stock-icon", NULL); 590 stockloader = g_object_new(PIDGIN_TYPE_ICON_THEME_LOADER, "type", "stock-icon", NULL);
590 purple_theme_manager_register_type(PURPLE_THEME_LOADER(stockloader)); 591 purple_theme_manager_register_type(PURPLE_THEME_LOADER(stockloader));
592 purple_prefs_add_none(PIDGIN_PREFS_ROOT "/stock");
591 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/stock/icon-theme", ""); 593 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/stock/icon-theme", "");
592 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/stock/icon-theme-dir", ""); 594 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/stock/icon-theme-dir", "");
593 595
594 /* register custom icon sizes */ 596 /* register custom icon sizes */
595 microscopic = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC, 11, 11); 597 microscopic = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC, 11, 11);
600 huge = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_HUGE, 64, 64); 602 huge = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_HUGE, 64, 64);
601 603
602 pidgin_stock_load_stock_icon_theme(NULL); 604 pidgin_stock_load_stock_icon_theme(NULL);
603 605
604 /* Pre-load Status icon theme - this avoids a bug with displaying the correct icon in the tray, theme is destroyed after*/ 606 /* Pre-load Status icon theme - this avoids a bug with displaying the correct icon in the tray, theme is destroyed after*/
605 if (purple_prefs_get_string(PIDGIN_PREFS_ROOT "/icon/status/theme") && 607 if (purple_prefs_get_string(PIDGIN_PREFS_ROOT "/status/icon-theme") &&
606 (path = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/status/icon-theme-dir"))) { 608 (path = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/status/icon-theme-dir"))) {
607 609
608 PidginStatusIconTheme *theme = PIDGIN_STATUS_ICON_THEME(purple_theme_loader_build(PURPLE_THEME_LOADER(loader), path)); 610 PidginStatusIconTheme *theme = PIDGIN_STATUS_ICON_THEME(purple_theme_loader_build(PURPLE_THEME_LOADER(loader), path));
609 pidgin_stock_load_status_icon_theme(theme); 611 pidgin_stock_load_status_icon_theme(theme);
610 g_object_unref(G_OBJECT(theme)); 612 if (theme)
613 g_object_unref(G_OBJECT(theme));
611 614
612 } 615 }
613 else 616 else
614 pidgin_stock_load_status_icon_theme(NULL); 617 pidgin_stock_load_status_icon_theme(NULL);
615 618