~ubuntu-branches/ubuntu/utopic/pcmanfm/utopic

« back to all changes in this revision

Viewing changes to src/exo/test.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Lee (李健秋)
  • Date: 2010-05-23 23:04:11 UTC
  • mfrom: (8.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100523230411-4ei3g4u14pf5rozb
Tags: 0.9.5-2
* Upload to sid. No new additional bug report since last upload into 
  experimental. (Closes:#506243, #509257, #532973, #502225, #535810, 
  #570114, #581033, #518683)
* debian/control:
  Adjusted depends/recommends for people who doesn't want to have gvfs
  on their system. Without gvfs installed, pcmanfm would still works 
  but lose volume management and trashcan support.
  - Drop depends on gamin, shared-mime-info, desktop-file-utils, dbus, 
    xdg-user-dirs
  - Recommends on lxde-icon-theme | gnome-icon-theme, gvfs-backends,
    gvfs-fuse

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <gtk/gtk.h>
2
 
#include "exo-icon-view.h"
3
 
 
4
 
int main(int argc, char** argv)
5
 
{
6
 
    gtk_init( &argc, &argv );
7
 
 
8
 
    GtkWidget* win = gtk_window_new( GTK_WINDOW_TOPLEVEL );
9
 
    GtkListStore* list = gtk_list_store_new( 2, GDK_TYPE_PIXBUF, G_TYPE_STRING );
10
 
    ExoIconView* view = exo_icon_view_new_with_model( list );
11
 
    GtkTreeIter it;
12
 
    GdkPixbuf* pix = gtk_icon_theme_load_icon( gtk_icon_theme_get_default(), "folder", 48, 0, NULL );
13
 
    GtkWidget* scroll = gtk_scrolled_window_new(NULL, NULL);
14
 
 
15
 
    gtk_list_store_insert_with_values( list, &it, 0, 0, pix, 1, "Test", -1 );
16
 
    gtk_list_store_insert_with_values( list, &it, 1, 0, pix, 1, "Test", -1 );
17
 
    gtk_list_store_insert_with_values( list, &it, 2, 0, pix, 1, "Test", -1 );
18
 
    gtk_list_store_insert_with_values( list, &it, 3, 0, pix, 1, "Test", -1 );
19
 
    g_object_unref( pix );
20
 
 
21
 
    exo_icon_view_set_text_column( view, 1 );
22
 
    exo_icon_view_set_pixbuf_column( view, 0 );
23
 
    exo_icon_view_set_orientation( view, GTK_ORIENTATION_HORIZONTAL );
24
 
    exo_icon_view_set_layout_mode( view, EXO_ICON_VIEW_LAYOUT_COLS );
25
 
    exo_icon_view_set_columns( view, -1 );
26
 
    exo_icon_view_set_item_width( view, 128 );
27
 
    exo_icon_view_set_single_click(view, TRUE);
28
 
    exo_icon_view_set_selection_mode( view, GTK_SELECTION_MULTIPLE );
29
 
 
30
 
    gtk_container_add( scroll, view );
31
 
    gtk_container_add( win, scroll );
32
 
    gtk_widget_show_all( win );
33
 
    gtk_main();
34
 
    gtk_widget_destroy( win );
35
 
    return 0;
36
 
}