comparison src/gtkprefs.c @ 8075:41e973dbca03

[gaim-migrate @ 8774] This makes prefs correctly show which smiley theme is selected. The problem was that the index # of the selected theme was chosen from the unsorted list, but when actually selecting theme row the sorted list was used. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 11 Jan 2004 20:47:13 +0000
parents f1822a0c103a
children a89cffefca93
comparison
equal deleted inserted replaced
8074:2ec7538dd349 8075:41e973dbca03
565 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); 565 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
566 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); 566 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
567 567
568 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); 568 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0);
569 smiley_theme_store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING); 569 smiley_theme_store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
570 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(smiley_theme_store),
571 1, GTK_SORT_ASCENDING);
572 570
573 path = theme_refresh_theme_list(); 571 path = theme_refresh_theme_list();
574 572
575 view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(smiley_theme_store)); 573 view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(smiley_theme_store));
576 574
577 gtk_drag_dest_set(view, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP, te, 575 gtk_drag_dest_set(view, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP, te,
578 sizeof(te) / sizeof(GtkTargetEntry) , GDK_ACTION_COPY | GDK_ACTION_MOVE); 576 sizeof(te) / sizeof(GtkTargetEntry) , GDK_ACTION_COPY | GDK_ACTION_MOVE);
579 577
584 582
585 if(path) { 583 if(path) {
586 gtk_tree_selection_select_path(sel, path); 584 gtk_tree_selection_select_path(sel, path);
587 gtk_tree_path_free(path); 585 gtk_tree_path_free(path);
588 } 586 }
587 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(smiley_theme_store),
588 1, GTK_SORT_ASCENDING);
589 589
590 col = gtk_tree_view_column_new_with_attributes (_("Icon"), 590 col = gtk_tree_view_column_new_with_attributes (_("Icon"),
591 rend, 591 rend,
592 "pixbuf", 0, 592 "pixbuf", 0,
593 NULL); 593 NULL);
600 NULL); 600 NULL);
601 gtk_tree_view_append_column (GTK_TREE_VIEW(view), col); 601 gtk_tree_view_append_column (GTK_TREE_VIEW(view), col);
602 g_object_unref(G_OBJECT(smiley_theme_store)); 602 g_object_unref(G_OBJECT(smiley_theme_store));
603 gtk_container_add(GTK_CONTAINER(sw), view); 603 gtk_container_add(GTK_CONTAINER(sw), view);
604 604
605 g_signal_connect (G_OBJECT (sel), "changed", 605 g_signal_connect(G_OBJECT(sel), "changed", G_CALLBACK(smiley_sel), NULL);
606 G_CALLBACK (smiley_sel),
607 NULL);
608
609 606
610 gtk_widget_show_all(ret); 607 gtk_widget_show_all(ret);
611 return ret; 608 return ret;
612 } 609 }
613 610