~ubuntu-branches/ubuntu/quantal/libfm/quantal

« back to all changes in this revision

Viewing changes to src/gtk/exo/test.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2011-02-21 21:55:43 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110221215543-m7gn2snkhpk1kk9u
Tags: 0.1.15+git-3625952cea-0ubuntu1
* New upstream snapshot (2011-02-15)
 - Use x-schemas-handler (LP: #683922)
* debian/patches/
 - 90_add_gobject_link.patch: Remove, merged upstream.
 - 02-libfm-0.1.14-API-changes.patch: Refresh.
 - 03_disable_deprecated_gio_module.patch: Refresh.
 - 04_fix_docs_linker.patch: Fix DSO linking in docs/.
* debian/libfm0.install:
 - Remove usr/lib/libfm/gnome-terminal, dropped upstream.
 - Remove gio module, dropped upstream.
* debian/rules:
 - Add --enable-gtk-doc to configure.
* debian/libfm-gtk0.symbols:
 - Update with new symbols.
* debian/apport/source_libfm.py
 - Fix location of pcmanfm config files.

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
}