/* Esta funcion se llama cuando se cambia o actualizan los iconos */ static void theme_changed_cb(GtkIconTheme* theme, MateDACapplet* capplet) { GObject* icon; gint i; for (i = 0; i < G_N_ELEMENTS(icons); i++) { icon = gtk_builder_get_object(capplet->builder, icons[i].name); GdkPixbuf* pixbuf = gtk_icon_theme_load_icon(theme, icons[i].icon, 32, 0, NULL); gtk_image_set_from_pixbuf(GTK_IMAGE(icon), pixbuf); if (pixbuf) { g_object_unref(pixbuf); } } refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->web_combo_box), capplet->web_browsers); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->mail_combo_box), capplet->mail_readers); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->media_combo_box), capplet->media_players); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->term_combo_box), capplet->terminals); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->visual_combo_box), capplet->visual_ats); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->mobility_combo_box), capplet->mobility_ats); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->file_combo_box), capplet->file_managers); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->text_combo_box), capplet->text_editors); }
static void theme_changed_cb(GtkIconTheme* theme, MateDACapplet* capplet) { GObject *icon; gint i; for (i = 0; i < G_N_ELEMENTS (icons); i++) { icon = gtk_builder_get_object (capplet->builder, icons[i].name); set_icon (GTK_IMAGE (icon), theme, icons[i].icon); } refresh_combo_box_icons (theme, GTK_COMBO_BOX (capplet->web_combo_box), capplet->web_browsers); refresh_combo_box_icons (theme, GTK_COMBO_BOX (capplet->mail_combo_box), capplet->mail_readers); refresh_combo_box_icons (theme, GTK_COMBO_BOX (capplet->media_combo_box), capplet->media_players); refresh_combo_box_icons (theme, GTK_COMBO_BOX (capplet->term_combo_box), capplet->terminals); refresh_combo_box_icons (theme, GTK_COMBO_BOX (capplet->visual_combo_box), capplet->visual_ats); refresh_combo_box_icons (theme, GTK_COMBO_BOX (capplet->mobility_combo_box), capplet->mobility_ats); }