Tracker: Bugs

5 Right-click menu does not work with libfm git - ID: 3559831
Last Update: Comment added ( lstranger )

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?


hoodbild ( hoodbild ) - 2012-08-20 05:30:10 PDT

5

Closed

Fixed

Lonely Stranger

libfm

1.0.1

Public


Comments ( 6 )

Date: 2012-08-21 05:20:00 PDT
Sender: lstranger

Thank you very much. Reverted back in the Git.


Date: 2012-08-21 02:58:24 PDT
Sender: hoodbild

Yes, that works.


Date: 2012-08-20 07:44:47 PDT
Sender: lstranger

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.


Date: 2012-08-20 07:36:41 PDT
Sender: hoodbild

> 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.


Date: 2012-08-20 07:34:07 PDT
Sender: hoodbild

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)



Date: 2012-08-20 06:01:53 PDT
Sender: lstranger

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. :(


Attached File

No Files Currently Attached

Changes ( 7 )

Field Old Value Date By
resolution_id Works For Me 2012-08-21 05:20:00 PDT lstranger
assigned_to nobody 2012-08-21 05:20:00 PDT lstranger
close_date - 2012-08-21 05:20:00 PDT lstranger
status_id Open 2012-08-21 05:20:00 PDT lstranger
category_id None 2012-08-21 05:20:00 PDT lstranger
artifact_group_id None 2012-08-20 06:01:53 PDT lstranger
resolution_id None 2012-08-20 06:01:53 PDT lstranger