Commit f1c27961 authored by Maciej Stachowiak's avatar Maciej Stachowiak

Rename "row_popup_menu" and "empty_popup_menu" signals to

	* libnautilus/gtkflist.c, libnautilus/gtkflist.h: Rename
	"row_popup_menu" and "empty_popup_menu" signals to
	"context_click_row" and "context_click_background" for more
	consistency with the way the icon container does it. Removed
	GdkEvent parameters from these signals. Added an int indicating
	the row right-clicked.
	(gtk_flist_button_press): Do not change the selection to the row
	that gets right-clicked. It was inconsistent with the icon view
	and most of the known universe.
parent c8853690
2000-01-24 Maciej Stachowiak <mjs@eazel.com>
* libnautilus/gtkflist.c, libnautilus/gtkflist.h: Rename
"row_popup_menu" and "empty_popup_menu" signals to
"context_click_row" and "context_click_background" for more
consistency with the way the icon container does it. Removed
GdkEvent parameters from these signals. Added an int indicating
the row right-clicked.
(gtk_flist_button_press): Do not change the selection to the row
that gets right-clicked. It was inconsistent with the icon view
and most of the known universe.
2000-01-21 Darin Adler <darin@eazel.com>
Added a controller object that lets GnomeIconContainer
......@@ -130,6 +143,7 @@
src/file-manager/fm-default-file-icon.c:
Moved the default icon into its own file.
>>>>>>> 1.183
2000-01-24 John Sullivan <sullivan@eazel.com>
* libnautilus/gnome-icon-container.c:
......
......@@ -48,8 +48,8 @@ struct _GtkFListDetails
#define MAX_CLICK_TIME 1500
enum {
ROW_POPUP_MENU,
EMPTY_POPUP_MENU,
CONTEXT_CLICK_ROW,
CONTEXT_CLICK_BACKGROUND,
ACTIVATE,
START_DRAG,
SELECTION_CHANGED,
......@@ -104,22 +104,21 @@ gtk_flist_initialize_class (GtkFListClass *class)
widget_class = (GtkWidgetClass *) class;
clist_class = (GtkCListClass *) class;
flist_signals[ROW_POPUP_MENU] =
gtk_signal_new ("row_popup_menu",
flist_signals[CONTEXT_CLICK_ROW] =
gtk_signal_new ("context_click_row",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkFListClass, row_popup_menu),
gtk_marshal_NONE__POINTER,
GTK_SIGNAL_OFFSET (GtkFListClass, context_click_row),
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1,
GTK_TYPE_GDK_EVENT);
flist_signals[EMPTY_POPUP_MENU] =
gtk_signal_new ("empty_popup_menu",
GTK_TYPE_INT);
flist_signals[CONTEXT_CLICK_BACKGROUND] =
gtk_signal_new ("context_click_background",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkFListClass, empty_popup_menu),
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_GDK_EVENT);
GTK_SIGNAL_OFFSET (GtkFListClass, context_click_background),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
flist_signals[ACTIVATE] =
gtk_signal_new ("activate",
GTK_RUN_FIRST,
......@@ -318,14 +317,12 @@ gtk_flist_button_press (GtkWidget *widget, GdkEventButton *event)
retval = TRUE;
} else if (event->button == 3) {
if (on_row) {
select_row (flist, row, event->state);
gtk_signal_emit (GTK_OBJECT (flist),
flist_signals[ROW_POPUP_MENU],
event);
flist_signals[CONTEXT_CLICK_ROW],
row);
} else
gtk_signal_emit (GTK_OBJECT (flist),
flist_signals[EMPTY_POPUP_MENU],
event);
flist_signals[CONTEXT_CLICK_BACKGROUND]);
retval = TRUE;
}
......
......@@ -36,10 +36,10 @@ struct _GtkFListClass {
GtkCListClass parent_class;
/* Signal: invoke the popup menu for rows */
void (* row_popup_menu) (GtkFList *flist, GdkEventButton *event);
void (* context_click_row) (GtkFList *flist, gint row);
/* Signal: invoke the popup menu for empty areas */
void (* empty_popup_menu) (GtkFList *flist, GdkEventButton *event);
void (* context_click_background) (GtkFList *flist);
/* Signal: open the file in the selected row */
void (* activate) (GtkFList *flist, gpointer data);
......
......@@ -48,8 +48,8 @@ struct _GtkFListDetails
#define MAX_CLICK_TIME 1500
enum {
ROW_POPUP_MENU,
EMPTY_POPUP_MENU,
CONTEXT_CLICK_ROW,
CONTEXT_CLICK_BACKGROUND,
ACTIVATE,
START_DRAG,
SELECTION_CHANGED,
......@@ -104,22 +104,21 @@ gtk_flist_initialize_class (GtkFListClass *class)
widget_class = (GtkWidgetClass *) class;
clist_class = (GtkCListClass *) class;
flist_signals[ROW_POPUP_MENU] =
gtk_signal_new ("row_popup_menu",
flist_signals[CONTEXT_CLICK_ROW] =
gtk_signal_new ("context_click_row",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkFListClass, row_popup_menu),
gtk_marshal_NONE__POINTER,
GTK_SIGNAL_OFFSET (GtkFListClass, context_click_row),
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1,
GTK_TYPE_GDK_EVENT);
flist_signals[EMPTY_POPUP_MENU] =
gtk_signal_new ("empty_popup_menu",
GTK_TYPE_INT);
flist_signals[CONTEXT_CLICK_BACKGROUND] =
gtk_signal_new ("context_click_background",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkFListClass, empty_popup_menu),
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_GDK_EVENT);
GTK_SIGNAL_OFFSET (GtkFListClass, context_click_background),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
flist_signals[ACTIVATE] =
gtk_signal_new ("activate",
GTK_RUN_FIRST,
......@@ -318,14 +317,12 @@ gtk_flist_button_press (GtkWidget *widget, GdkEventButton *event)
retval = TRUE;
} else if (event->button == 3) {
if (on_row) {
select_row (flist, row, event->state);
gtk_signal_emit (GTK_OBJECT (flist),
flist_signals[ROW_POPUP_MENU],
event);
flist_signals[CONTEXT_CLICK_ROW],
row);
} else
gtk_signal_emit (GTK_OBJECT (flist),
flist_signals[EMPTY_POPUP_MENU],
event);
flist_signals[CONTEXT_CLICK_BACKGROUND]);
retval = TRUE;
}
......
......@@ -36,10 +36,10 @@ struct _GtkFListClass {
GtkCListClass parent_class;
/* Signal: invoke the popup menu for rows */
void (* row_popup_menu) (GtkFList *flist, GdkEventButton *event);
void (* context_click_row) (GtkFList *flist, gint row);
/* Signal: invoke the popup menu for empty areas */
void (* empty_popup_menu) (GtkFList *flist, GdkEventButton *event);
void (* context_click_background) (GtkFList *flist);
/* Signal: open the file in the selected row */
void (* activate) (GtkFList *flist, gpointer data);
......
......@@ -48,8 +48,8 @@ struct _GtkFListDetails
#define MAX_CLICK_TIME 1500
enum {
ROW_POPUP_MENU,
EMPTY_POPUP_MENU,
CONTEXT_CLICK_ROW,
CONTEXT_CLICK_BACKGROUND,
ACTIVATE,
START_DRAG,
SELECTION_CHANGED,
......@@ -104,22 +104,21 @@ gtk_flist_initialize_class (GtkFListClass *class)
widget_class = (GtkWidgetClass *) class;
clist_class = (GtkCListClass *) class;
flist_signals[ROW_POPUP_MENU] =
gtk_signal_new ("row_popup_menu",
flist_signals[CONTEXT_CLICK_ROW] =
gtk_signal_new ("context_click_row",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkFListClass, row_popup_menu),
gtk_marshal_NONE__POINTER,
GTK_SIGNAL_OFFSET (GtkFListClass, context_click_row),
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1,
GTK_TYPE_GDK_EVENT);
flist_signals[EMPTY_POPUP_MENU] =
gtk_signal_new ("empty_popup_menu",
GTK_TYPE_INT);
flist_signals[CONTEXT_CLICK_BACKGROUND] =
gtk_signal_new ("context_click_background",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkFListClass, empty_popup_menu),
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_GDK_EVENT);
GTK_SIGNAL_OFFSET (GtkFListClass, context_click_background),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
flist_signals[ACTIVATE] =
gtk_signal_new ("activate",
GTK_RUN_FIRST,
......@@ -318,14 +317,12 @@ gtk_flist_button_press (GtkWidget *widget, GdkEventButton *event)
retval = TRUE;
} else if (event->button == 3) {
if (on_row) {
select_row (flist, row, event->state);
gtk_signal_emit (GTK_OBJECT (flist),
flist_signals[ROW_POPUP_MENU],
event);
flist_signals[CONTEXT_CLICK_ROW],
row);
} else
gtk_signal_emit (GTK_OBJECT (flist),
flist_signals[EMPTY_POPUP_MENU],
event);
flist_signals[CONTEXT_CLICK_BACKGROUND]);
retval = TRUE;
}
......
......@@ -36,10 +36,10 @@ struct _GtkFListClass {
GtkCListClass parent_class;
/* Signal: invoke the popup menu for rows */
void (* row_popup_menu) (GtkFList *flist, GdkEventButton *event);
void (* context_click_row) (GtkFList *flist, gint row);
/* Signal: invoke the popup menu for empty areas */
void (* empty_popup_menu) (GtkFList *flist, GdkEventButton *event);
void (* context_click_background) (GtkFList *flist);
/* Signal: open the file in the selected row */
void (* activate) (GtkFList *flist, gpointer data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment