Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#587 Right-click menu does not work with libfm git

1.0.1
closed-fixed
libfm (236)
5
2012-08-21
2012-08-20
alister.hood
No

http://pcmanfm.git.sourceforge.net/git/gitweb.cgi?p=pcmanfm/libfm;a=commit;h=aa5566d6c3caaed6ef58d1330d0d6e4634b9cf34

On my system the commit above broke pcmanfm, so that right-clicking on an item in a folder does not work.
Right-clicking on an item on the desktop does still open the context menu as expected.
Maybe pcmanfm git needs something updated to match the current libfm?

Discussion

  • Thank you. The mentioned commit affects only selection update, not right-click menu - code which handles click wasn't changed by that commit, so it should be something else then. And also it works fine for me so I don't know why it should not for you. :(

     
    • milestone: --> 1.0.1
    • status: open --> open-works-for-me
     
  • alister.hood
    alister.hood
    2012-08-20

    Well, all I know is that the right-click doesn't work with current git unless I apply this, which is almost exactly a rollback of that commit:

    --- /var/abs/local/yaourtbuild/libfm-git/src/libfm-build/src/gtk/fm-standard-view.c
    +++ /var/abs/local/yaourtbuild/libfm-git/src/libfm/src/gtk/fm-standard-view.c
    @@ -78,7 +78,7 @@

    /* for very large folder update */
    guint sel_changed_idle;
    - gboolean sel_changed_pending;
    + //gboolean sel_changed_pending;

    FmFileInfoList* cached_selected_files;
    FmPathList* cached_selected_file_paths;
    @@ -304,11 +304,11 @@
    g_signal_handlers_disconnect_by_func(fm_config, on_single_click_changed, object);
    cancel_pending_row_activated(self); /* this frees activated_row_ref */

    - if(self->sel_changed_idle)
    - {
    - g_source_remove(self->sel_changed_idle);
    - self->sel_changed_idle = 0;
    - }
    +// if(self->sel_changed_idle)
    +// {
    +// g_source_remove(self->sel_changed_idle);
    +// self->sel_changed_idle = 0;
    +// }

    if(self->icon_size_changed_handler)
    {
    @@ -798,7 +798,7 @@
    g_signal_connect(fv->view, "drag-drop", G_CALLBACK(on_drag_drop), fv);
    g_signal_connect(fv->view, "drag-data-received", G_CALLBACK(on_drag_data_received), fv);
    /* connect it after to let exo view change selection */
    - g_signal_connect_after(fv->view, "button-press-event", G_CALLBACK(on_btn_pressed), fv);
    + g_signal_connect(fv->view, "button-press-event", G_CALLBACK(on_btn_pressed), fv);

    fm_dnd_set_dest_auto_scroll(fv->view, gtk_scrolled_window_get_hadjustment((GtkScrolledWindow*)fv), gtk_scrolled_window_get_vadjustment((GtkScrolledWindow*)fv));

    @@ -1115,8 +1115,9 @@
    }
    }

    -static gboolean on_sel_changed_real(FmStandardView* fv)
    -{
    +static gboolean on_sel_changed_real(gpointer user_data)
    +{
    + FmStandardView* fv = (FmStandardView*)user_data;
    /* clear cached selected files */
    if(fv->cached_selected_files)
    {
    @@ -1128,37 +1129,16 @@
    fm_path_list_unref(fv->cached_selected_file_paths);
    fv->cached_selected_file_paths = NULL;
    }
    + fv->sel_changed_idle = 0;
    fm_folder_view_sel_changed(NULL, FM_FOLDER_VIEW(fv));
    - fv->sel_changed_pending = FALSE;
    - return TRUE;
    -}
    -
    -/*
    - * We limit "sel-changed" emitting here:
    - * - if no signal was in last 200ms then signal is emitted immidiately
    - * - if there was < 200ms since last signal then it's marked as pending
    - * and signal will be emitted when that 200ms timeout ends
    - */
    -static gboolean on_sel_changed_idle(gpointer user_data)
    -{
    - FmStandardView* fv = (FmStandardView*)user_data;
    -
    - if(fv->sel_changed_pending) /* fast changing detected! continue... */
    - return on_sel_changed_real(fv);
    - fv->sel_changed_idle = 0;
    return FALSE;
    }

    static void on_sel_changed(GObject* obj, FmStandardView* fv)
    {
    if(!fv->sel_changed_idle)
    - {
    fv->sel_changed_idle = g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 200,
    - on_sel_changed_idle, fv, NULL);
    - on_sel_changed_real(fv);
    - }
    - else
    - fv->sel_changed_pending = TRUE;
    + on_sel_changed_real, fv, NULL);
    }

    static void fm_standard_view_select_invert(FmFolderView* ffv)

     
  • alister.hood
    alister.hood
    2012-08-20

    > which is almost exactly a rollback of that commit

    If I remember correctly there is just one line where I had to change the name of a couple of things.

    BTW I don't use "Open files with single click" mode.

     
  • Thank you very much. Well, please, could you not rollback all commit but only that place:

    - g_signal_connect(fv->view, "button-press-event", G_CALLBACK(on_btn_pressed), fv);
    + g_signal_connect_after(fv->view, "button-press-event", G_CALLBACK(on_btn_pressed), fv);

    and check if it fixes your problem? I suspect that change messes with your configuration somehow.

     
  • alister.hood
    alister.hood
    2012-08-21

    Yes, that works.

     
    • labels: --> libfm
    • assigned_to: nobody --> lstranger
    • status: open-works-for-me --> closed-fixed
     
  • Thank you very much. Reverted back in the Git.