diff --git a/docs/reference/exo.actions b/docs/reference/exo.actions new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/exo/exo-thumbnail-preview.c b/exo/exo-thumbnail-preview.c index 93f2506c06efa9f2ae748477303f62fa6baafd79..60924618e49eb2c76412b9bc3dfcb2c7fd6a2a78 100644 --- a/exo/exo-thumbnail-preview.c +++ b/exo/exo-thumbnail-preview.c @@ -81,8 +81,6 @@ exo_thumbnail_preview_class_init (ExoThumbnailPreviewClass *klass) static void exo_thumbnail_preview_init (ExoThumbnailPreview *thumbnail_preview) { - GtkWidget *button; - GtkWidget *label; GtkWidget *ebox; GtkWidget *vbox; GtkWidget *box; @@ -91,6 +89,7 @@ exo_thumbnail_preview_init (ExoThumbnailPreview *thumbnail_preview) _exo_i18n_init (); gtk_frame_set_shadow_type (GTK_FRAME (thumbnail_preview), GTK_SHADOW_IN); + gtk_frame_set_label (GTK_FRAME (thumbnail_preview), _("Preview")); gtk_widget_set_sensitive (GTK_WIDGET (thumbnail_preview), FALSE); ebox = gtk_event_box_new (); @@ -102,19 +101,6 @@ exo_thumbnail_preview_init (ExoThumbnailPreview *thumbnail_preview) gtk_container_add (GTK_CONTAINER (ebox), vbox); gtk_widget_show (vbox); - button = gtk_button_new (); - g_signal_connect (G_OBJECT (button), "button-press-event", G_CALLBACK (exo_noop_true), NULL); - g_signal_connect (G_OBJECT (button), "button-release-event", G_CALLBACK (exo_noop_true), NULL); - g_signal_connect (G_OBJECT (button), "enter-notify-event", G_CALLBACK (exo_noop_true), NULL); - g_signal_connect (G_OBJECT (button), "leave-notify-event", G_CALLBACK (exo_noop_true), NULL); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - - label = gtk_label_new (_("Preview")); - g_object_set (label, "xalign", 0.0f, "yalign", 0.5f, NULL); - gtk_container_add (GTK_CONTAINER (button), label); - gtk_widget_show (label); - box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); gtk_container_set_border_width (GTK_CONTAINER (box), 2); diff --git a/exo/exo-tree-view.c b/exo/exo-tree-view.c index 918ad0bdd74ed638779025beb970e63e3bb96ea9..b2c63c1aeef04b4783bf331a43e5dab5967bc673 100644 --- a/exo/exo-tree-view.c +++ b/exo/exo-tree-view.c @@ -87,6 +87,16 @@ static gboolean exo_tree_view_move_cursor (GtkTreeView *v gint count); static gboolean exo_tree_view_single_click_timeout (gpointer user_data); static void exo_tree_view_single_click_timeout_destroy (gpointer user_data); +static gboolean select_true (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer data); +static gboolean select_false (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer data); @@ -348,7 +358,7 @@ exo_tree_view_button_press_event (GtkWidget *widget, if (event->type == GDK_BUTTON_PRESS && (event->state & gtk_accelerator_get_default_mod_mask ()) == 0 && path != NULL && gtk_tree_selection_path_is_selected (selection, path)) { - gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_false, NULL, NULL); + gtk_tree_selection_set_select_function (selection, select_false, NULL, NULL); } /* call the parent's button press handler */ @@ -362,9 +372,9 @@ exo_tree_view_button_press_event (GtkWidget *widget, if (GTK_IS_TREE_SELECTION (selection)) { /* Re-enable selection updates */ - if (G_LIKELY (gtk_tree_selection_get_select_function (selection) == (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_false)) + if (G_LIKELY (gtk_tree_selection_get_select_function (selection) == select_false)) { - gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_true, NULL, NULL); + gtk_tree_selection_set_select_function (selection, select_true, NULL, NULL); } } @@ -675,13 +685,13 @@ exo_tree_view_single_click_timeout (gpointer user_data) /* check if the hover path is selected (as it will be selected after the set_cursor() call) */ hover_path_selected = gtk_tree_selection_path_is_selected (selection, tree_view->priv->hover_path); /* disable selection updates if the path is still selected */ - gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_false, NULL, NULL); + gtk_tree_selection_set_select_function (selection, select_false, NULL, NULL); /* place the cursor on the hover row */ gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), tree_view->priv->hover_path, cursor_column, FALSE); /* re-enable selection updates */ - gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_true, NULL, NULL); + gtk_tree_selection_set_select_function (selection, select_true, NULL, NULL); /* check what to do */ if ((gtk_tree_selection_get_mode (selection) == GTK_SELECTION_MULTIPLE || @@ -846,5 +856,29 @@ exo_tree_view_set_single_click_timeout (ExoTreeView *tree_view, +static gboolean +select_true (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer data) +{ + return TRUE; +} + + + +static gboolean +select_false (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer data) +{ + return FALSE; +} + + + #define __EXO_TREE_VIEW_C__ #include