inf-gtk-browser-model

inf-gtk-browser-model

Functions

Signals

void set-browser Run Last

Types and Values

Object Hierarchy

    GEnum
    ╰── InfGtkBrowserModelStatus
    GInterface
    ╰── InfGtkBrowserModel

Prerequisites

InfGtkBrowserModel requires GtkTreeModel and GObject.

Known Implementations

InfGtkBrowserModel is implemented by InfGtkBrowserModelFilter, InfGtkBrowserModelSort and InfGtkBrowserStore.

Description

Functions

INF_GTK_TYPE_BROWSER_MODEL_STATUS

#define INF_GTK_TYPE_BROWSER_MODEL_STATUS          (inf_gtk_browser_model_status_get_type())


inf_gtk_browser_model_set_browser ()

void
inf_gtk_browser_model_set_browser (InfGtkBrowserModel *model,
                                   GtkTreePath *path,
                                   GtkTreeIter *iter,
                                   InfcBrowser *browser);

Emits the “set-browser” signal. This is supposed to only be called by implementations of InfGtkBrowserModel whenever they set or unset a browser on a row.

Parameters

model

A InfGtkBrowserModel.

 

path

A GtkTreePath to a top-level row.

 

iter

A GtkTreeIter pointing to the same row.

 

browser

The new InfcBrowser to set.

 

inf_gtk_browser_model_resolve ()

void
inf_gtk_browser_model_resolve (InfGtkBrowserModel *model,
                               InfDiscovery *discovery,
                               InfDiscoveryInfo *info);

Resolves info and adds the resulting connection to the model. If that connection is already contained, the original (newly resolved) entry is removed in favor of the existing entry whose browser might already have explored (parts of) the server's directory.

Parameters

model

A InfGtkBrowserModel.

 

discovery

A InfDiscovery added to store .

 

info

A InfDiscoveryInfo discovered by discovery .

 

inf_gtk_browser_model_browser_iter_to_tree_iter ()

gboolean
inf_gtk_browser_model_browser_iter_to_tree_iter
                               (InfGtkBrowserModel *model,
                                InfcBrowser *browser,
                                InfcBrowserIter *browser_iter,
                                GtkTreeIter *tree_iter);

Sets tree_iter to point to the same node browser_iter refers to within the model. If browser is not known to model , i.e. its connection was never added to model , then the function returns FALSE and tree_iter is left untouched.

Parameters

model

A InfGtkBrowserModel.

 

browser

A InfcBrowser.

 

browser_iter

A InfcBrowserIter pointing into browser .

 

tree_iter

A GtkTreeIter that will be set by this function.

 

Returns

Whether tree_iter was set.

Types and Values

struct InfGtkBrowserModel

struct InfGtkBrowserModel;


enum InfGtkBrowserModelStatus

Members

INF_GTK_BROWSER_MODEL_INVALID

   

INF_GTK_BROWSER_MODEL_DISCOVERED

   

INF_GTK_BROWSER_MODEL_RESOLVING

   

INF_GTK_BROWSER_MODEL_DISCONNECTED

   

INF_GTK_BROWSER_MODEL_CONNECTING

   

INF_GTK_BROWSER_MODEL_CONNECTED

   

INF_GTK_BROWSER_MODEL_ERROR

   

enum InfGtkBrowserModelColumn

Members

INF_GTK_BROWSER_MODEL_COL_DISCOVERY_INFO

   

INF_GTK_BROWSER_MODEL_COL_DISCOVERY

   

INF_GTK_BROWSER_MODEL_COL_BROWSER

   

INF_GTK_BROWSER_MODEL_COL_STATUS

   

INF_GTK_BROWSER_MODEL_COL_NAME

   

INF_GTK_BROWSER_MODEL_COL_ERROR

   

INF_GTK_BROWSER_MODEL_COL_NODE

   

INF_GTK_BROWSER_MODEL_NUM_COLS

   

Signal Details

The “set-browser” signal

void
user_function (InfGtkBrowserModel *model,
               GtkTreePath        *path,
               GtkTreeIter        *iter,
               InfcBrowser        *browser,
               gpointer            user_data)

This signal is emitted every time a new browser is inserted to the model. This means either that a completely new item was inserted, or that an item providing only a discovery has been resolved (see inf_gtk_browser_model_resolve()).

Parameters

model

The InfGtkBrowserModel emitting the signal.

 

path

A GtkTreePath pointing to the newly created browser.

 

iter

A GtkTreeIter pointing to the newly created browser.

 

browser

The newly created InfcBrowser.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last