[Goodies-commits] r6558 - in sion/trunk: . src
Enrico Troeger
enrico at xfce.org
Sun Jan 25 23:13:10 CET 2009
Author: enrico
Date: 2009-01-25 22:13:10 +0000 (Sun, 25 Jan 2009)
New Revision: 6558
Modified:
sion/trunk/ChangeLog
sion/trunk/src/mountdialog.c
sion/trunk/src/window.c
Log:
Allow unmounting resources by toggling the 'Mounted' checkbox.
Modified: sion/trunk/ChangeLog
===================================================================
--- sion/trunk/ChangeLog 2009-01-25 22:12:45 UTC (rev 6557)
+++ sion/trunk/ChangeLog 2009-01-25 22:13:10 UTC (rev 6558)
@@ -14,6 +14,8 @@
Show a progressbar dialog when mounting bookmarks.
Move sion_get_application_icon_name() to common.c.
Some minor cleanups.
+ * src/window.c:
+ Allow unmounting resources by toggling the 'Mounted' checkbox.
2009-01-19 Enrico Tröger <enrico(at)xfce(dot)org>
Modified: sion/trunk/src/mountdialog.c
===================================================================
--- sion/trunk/src/mountdialog.c 2009-01-25 22:12:45 UTC (rev 6557)
+++ sion/trunk/src/mountdialog.c 2009-01-25 22:13:10 UTC (rev 6558)
@@ -98,7 +98,6 @@
{
SionMountDialogPrivate *priv = SION_MOUNT_DIALOG_GET_PRIVATE(widget);
- debug(__func__);
if (priv->timer_id != (guint) -1)
{
g_source_remove(priv->timer_id);
Modified: sion/trunk/src/window.c
===================================================================
--- sion/trunk/src/window.c 2009-01-25 22:12:45 UTC (rev 6557)
+++ sion/trunk/src/window.c 2009-01-25 22:13:10 UTC (rev 6558)
@@ -1104,6 +1104,24 @@
}
+static void tree_mounted_col_toggled_cb(G_GNUC_UNUSED GtkCellRendererToggle *cell,
+ gchar *pth, SionWindow *window)
+{
+ SionWindowPrivate *priv = SION_WINDOW_GET_PRIVATE(window);
+ GtkTreeSelection *selection;
+ GtkTreePath *path;
+
+ path = gtk_tree_path_new_from_string(pth);
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->treeview));
+
+ gtk_tree_selection_select_path(selection, path);
+
+ action_unmount_cb(NULL, window);
+
+ gtk_tree_path_free(path);
+}
+
+
static void create_tree_view(SionWindow *window)
{
SionWindowPrivate *priv = SION_WINDOW_GET_PRIVATE(window);
@@ -1139,6 +1157,7 @@
gtk_tree_view_column_set_sort_column_id(column, SION_WINDOW_COL_IS_MOUNTED);
gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE);
gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview), column);
+ g_signal_connect(renderer, "toggled", G_CALLBACK(tree_mounted_col_toggled_cb), window);
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
More information about the Goodies-commits
mailing list