Top | ![]() |
![]() |
![]() |
![]() |
void
gva_tree_view_init (void
);
Initializes the main tree view.
This function should be called once when the application starts.
GtkTreePath *
gva_tree_view_lookup (const gchar *game
);
Looks up game
in the tree view's store and returns a GtkTreePath
to the corresponding row, or NULL
if game
was not found.
gboolean
gva_tree_view_update (GError **error
);
Refreshes the contents of the tree view by querying the game database
using criteria appropriate for the currently selected game list view.
If an error occurs, it returns FALSE
and sets error
.
gboolean gva_tree_view_run_query (const gchar *expression
,GError **error
);
Similar to gva_tree_view_update()
but applies custom criteria to the game
database query. If an error occurs, it returns FALSE
and sets error
.
GtkTreeModel *
gva_tree_view_get_model (void
);
Thin wrapper for gtk_tree_view_get_model()
that uses the main tree view.
Returns the model the main tree view is based on. Returns NULL
if the
model is unset.
void
gva_tree_view_update_status_bar (void
);
Puts a message in the main status bar containing the MAME version and the number of games displayed in the current view. This message gets shown when the status bar has nothing more important to show.
const gchar *
gva_tree_view_get_selected_game (void
);
Returns the name of the game corresponding to the currently selected row,
or NULL
if no row is selected.
void
gva_tree_view_set_selected_game (const gchar *game
);
Selects the row corresponding to game
. If the row is invisible in
the current view, unselect all tree view rows. The function also calls
gva_tree_view_set_last_selected_game()
so that the selected game will be
persistent across sessions.
gint
gva_tree_view_get_selected_view (void
);
Returns the index of the currently selected view.
void
gva_tree_view_set_selected_view (gint view
);
Sets the game list view corresponding to index view
. See
gva_tree_view_get_selected_view()
for a list of valid indices.
Setting the game list view triggers a tree view update. See
gva_tree_view_update()
for details.
const gchar *
gva_tree_view_get_last_selected_game (void
);
Returns the name of the most recently selected game in either the
current or the previous session of GNOME Video Arcade.
Note that it is still possible for this function to return NULL
.
void
gva_tree_view_set_last_selected_game (const gchar *game
);
Writes game
to GSettings key selected-game
.
This is used to remember which game was selected in the previous session of GNOME Video Arcade so that the same game can be selected again automatically at startup.
void gva_tree_view_get_last_sort_column_id (GvaGameStoreColumn *column_id
,GtkSortType *order
);
Retrieves the most recently selected sort column ID and sort order in either the current or the previous session of GNOME Video Arcade.
void gva_tree_view_set_last_sort_column_id (GvaGameStoreColumn column_id
,GtkSortType order
);
Writes column_id
and order
to GSettings key
sort-column
.
This is used to remember which how the game list view was sorted in the previous session of GNOME Video Arcade so that the same sorting can be applied again automatically at startup.
gboolean gva_tree_view_button_press_event_cb (GtkTreeView *view
,GdkEventButton *event
);
Handler for “button-press-event” signals to the main tree view.
On right-click, selects the row that was clicked and shows a popup menu.
gboolean
gva_tree_view_popup_menu_cb (GtkTreeView *view
);
Handler for “popup-menu” signals to the main tree view.
Shows a popup menu.
gboolean gva_tree_view_query_tooltip_cb (GtkTreeView *view
,gint x
,gint y
,gboolean keyboard_mode
,GtkTooltip *tooltip
);
Handles tooltips for the main tree view.
view |
the main tree view |
|
x |
the x coordinate of the cursor position where the request has been emitted |
|
y |
the y coordinate of the cursor position where the request has been emitted |
|
keyboard_mode |
|
|
tooltip |
void gva_tree_view_row_activated_cb (GtkTreeView *view
,GtkTreePath *path
,GtkTreeViewColumn *column
);
Handler for “row-activated” signals to the main tree view.
Activates the GVA_ACTION_START action.
view |
the main tree view |
|
path |
the GtkTreePath for the activated row |
|
column |
the GtkTreeViewColumn in which the activation occurred |