mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 794976 - Wrong context menu on register sheet
Block the entry one and signal for the gnucash one to show.
This commit is contained in:
parent
6a37d7f5dd
commit
4e2697b02f
@ -172,7 +172,6 @@ static void gnc_main_window_cmd_help_contents (GtkAction *action, GncMainWindow
|
|||||||
static void gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window);
|
static void gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window);
|
||||||
|
|
||||||
static void do_popup_menu(GncPluginPage *page, GdkEventButton *event);
|
static void do_popup_menu(GncPluginPage *page, GdkEventButton *event);
|
||||||
static gboolean gnc_main_window_popup_menu_cb (GtkWidget *widget, GncPluginPage *page);
|
|
||||||
static GtkWidget *gnc_main_window_get_statusbar (GncWindow *window_in);
|
static GtkWidget *gnc_main_window_get_statusbar (GncWindow *window_in);
|
||||||
static void statusbar_notification_lastmodified(void);
|
static void statusbar_notification_lastmodified(void);
|
||||||
|
|
||||||
@ -4797,7 +4796,7 @@ do_popup_menu(GncPluginPage *page, GdkEventButton *event)
|
|||||||
* @return Always returns TRUE to indicate that the menu request was
|
* @return Always returns TRUE to indicate that the menu request was
|
||||||
* handled.
|
* handled.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
gboolean
|
||||||
gnc_main_window_popup_menu_cb (GtkWidget *widget,
|
gnc_main_window_popup_menu_cb (GtkWidget *widget,
|
||||||
GncPluginPage *page)
|
GncPluginPage *page)
|
||||||
{
|
{
|
||||||
|
@ -322,6 +322,24 @@ gboolean gnc_main_window_button_press_cb (GtkWidget *whatever,
|
|||||||
GdkEventButton *event,
|
GdkEventButton *event,
|
||||||
GncPluginPage *page);
|
GncPluginPage *page);
|
||||||
|
|
||||||
|
|
||||||
|
/** Callback function invoked when the user requests that Gnucash
|
||||||
|
* popup the contextual menu via the keyboard context-menu request
|
||||||
|
* key combination (Shift-F10 by default).
|
||||||
|
*
|
||||||
|
* @param page This is the GncPluginPage corresponding to the visible
|
||||||
|
* page.
|
||||||
|
*
|
||||||
|
* @param widget Whatever widget had focus when the user issued the
|
||||||
|
* keyboard context-menu request.
|
||||||
|
*
|
||||||
|
* @return Always returns TRUE to indicate that the menu request was
|
||||||
|
* handled.
|
||||||
|
*/
|
||||||
|
gboolean gnc_main_window_popup_menu_cb (GtkWidget *widget,
|
||||||
|
GncPluginPage *page);
|
||||||
|
|
||||||
|
|
||||||
/** Restore the persistent state of all windows.
|
/** Restore the persistent state of all windows.
|
||||||
*
|
*
|
||||||
* @param keyfile The GKeyFile containing persistent window state.
|
* @param keyfile The GKeyFile containing persistent window state.
|
||||||
|
@ -180,6 +180,7 @@ static void gnc_plugin_page_register_cmd_associate_location_transaction (GtkActi
|
|||||||
static void gnc_plugin_page_register_cmd_execassociated_transaction (GtkAction *action, GncPluginPageRegister *plugin_page);
|
static void gnc_plugin_page_register_cmd_execassociated_transaction (GtkAction *action, GncPluginPageRegister *plugin_page);
|
||||||
|
|
||||||
static void gnc_plugin_page_help_changed_cb( GNCSplitReg *gsr, GncPluginPageRegister *register_page );
|
static void gnc_plugin_page_help_changed_cb( GNCSplitReg *gsr, GncPluginPageRegister *register_page );
|
||||||
|
static void gnc_plugin_page_popup_menu_cb( GNCSplitReg *gsr, GncPluginPageRegister *register_page );
|
||||||
static void gnc_plugin_page_register_refresh_cb (GHashTable *changes, gpointer user_data);
|
static void gnc_plugin_page_register_refresh_cb (GHashTable *changes, gpointer user_data);
|
||||||
static void gnc_plugin_page_register_close_cb (gpointer user_data);
|
static void gnc_plugin_page_register_close_cb (gpointer user_data);
|
||||||
|
|
||||||
@ -1129,6 +1130,10 @@ gnc_plugin_page_register_create_widget (GncPluginPage *plugin_page)
|
|||||||
G_CALLBACK ( gnc_plugin_page_help_changed_cb ),
|
G_CALLBACK ( gnc_plugin_page_help_changed_cb ),
|
||||||
page );
|
page );
|
||||||
|
|
||||||
|
g_signal_connect (G_OBJECT (gsr), "show-popup-menu",
|
||||||
|
G_CALLBACK ( gnc_plugin_page_popup_menu_cb ),
|
||||||
|
page );
|
||||||
|
|
||||||
reg = gnc_ledger_display_get_split_register(priv->ledger);
|
reg = gnc_ledger_display_get_split_register(priv->ledger);
|
||||||
gnc_split_register_config(reg, reg->type, reg->style,
|
gnc_split_register_config(reg, reg->type, reg->style,
|
||||||
reg->use_double_line);
|
reg->use_double_line);
|
||||||
@ -4054,6 +4059,23 @@ gnc_plugin_page_help_changed_cb (GNCSplitReg *gsr, GncPluginPageRegister *regist
|
|||||||
g_free(help);
|
g_free(help);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gnc_plugin_page_popup_menu_cb (GNCSplitReg *gsr, GncPluginPageRegister *register_page)
|
||||||
|
{
|
||||||
|
GncWindow *window;
|
||||||
|
|
||||||
|
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER(register_page));
|
||||||
|
|
||||||
|
window = GNC_WINDOW(GNC_PLUGIN_PAGE(register_page)->window);
|
||||||
|
if (!window)
|
||||||
|
{
|
||||||
|
// This routine can be called before the page is added to a
|
||||||
|
// window.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gnc_main_window_popup_menu_cb (GTK_WIDGET(window), GNC_PLUGIN_PAGE(register_page));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_plugin_page_register_refresh_cb (GHashTable *changes, gpointer user_data)
|
gnc_plugin_page_register_refresh_cb (GHashTable *changes, gpointer user_data)
|
||||||
{
|
{
|
||||||
|
@ -113,9 +113,10 @@ void gsr_default_reverse_txn_handler ( GNCSplitReg *w, gpointer ud );
|
|||||||
void gsr_default_associate_handler ( GNCSplitReg *w, gboolean uri_is_file );
|
void gsr_default_associate_handler ( GNCSplitReg *w, gboolean uri_is_file );
|
||||||
void gsr_default_execassociated_handler ( GNCSplitReg *w, gpointer ud );
|
void gsr_default_execassociated_handler ( GNCSplitReg *w, gpointer ud );
|
||||||
|
|
||||||
static void gsr_emit_simple_signal( GNCSplitReg *gsr, const char *sigName );
|
static void gsr_emit_simple_signal ( GNCSplitReg *gsr, const char *sigName );
|
||||||
static void gsr_emit_help_changed( GnucashRegister *reg, gpointer user_data );
|
static void gsr_emit_help_changed ( GnucashRegister *reg, gpointer user_data );
|
||||||
static void gsr_emit_include_date_signal( GNCSplitReg *gsr, time64 date );
|
static void gsr_emit_show_popup_menu ( GnucashRegister *reg, gpointer user_data );
|
||||||
|
static void gsr_emit_include_date_signal ( GNCSplitReg *gsr, time64 date );
|
||||||
|
|
||||||
void gnc_split_reg_cut_cb(GtkWidget *w, gpointer data);
|
void gnc_split_reg_cut_cb(GtkWidget *w, gpointer data);
|
||||||
void gnc_split_reg_copy_cb(GtkWidget *w, gpointer data);
|
void gnc_split_reg_copy_cb(GtkWidget *w, gpointer data);
|
||||||
@ -221,6 +222,7 @@ enum gnc_split_reg_signal_enum
|
|||||||
UNVOID_TXN_SIGNAL,
|
UNVOID_TXN_SIGNAL,
|
||||||
REVERSE_TXN_SIGNAL,
|
REVERSE_TXN_SIGNAL,
|
||||||
HELP_CHANGED_SIGNAL,
|
HELP_CHANGED_SIGNAL,
|
||||||
|
SHOW_POPUP_MENU_SIGNAL,
|
||||||
INCLUDE_DATE_SIGNAL,
|
INCLUDE_DATE_SIGNAL,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
@ -239,26 +241,27 @@ gnc_split_reg_class_init( GNCSplitRegClass *klass )
|
|||||||
guint defaultOffset;
|
guint defaultOffset;
|
||||||
} signals[] =
|
} signals[] =
|
||||||
{
|
{
|
||||||
{ ENTER_ENT_SIGNAL, "enter_ent", G_STRUCT_OFFSET( GNCSplitRegClass, enter_ent_cb ) },
|
{ ENTER_ENT_SIGNAL, "enter_ent", G_STRUCT_OFFSET( GNCSplitRegClass, enter_ent_cb ) },
|
||||||
{ CANCEL_ENT_SIGNAL, "cancel_ent", G_STRUCT_OFFSET( GNCSplitRegClass, cancel_ent_cb ) },
|
{ CANCEL_ENT_SIGNAL, "cancel_ent", G_STRUCT_OFFSET( GNCSplitRegClass, cancel_ent_cb ) },
|
||||||
{ DELETE_ENT_SIGNAL, "delete_ent", G_STRUCT_OFFSET( GNCSplitRegClass, delete_ent_cb ) },
|
{ DELETE_ENT_SIGNAL, "delete_ent", G_STRUCT_OFFSET( GNCSplitRegClass, delete_ent_cb ) },
|
||||||
{ REINIT_ENT_SIGNAL, "reinit_ent", G_STRUCT_OFFSET( GNCSplitRegClass, reinit_ent_cb ) },
|
{ REINIT_ENT_SIGNAL, "reinit_ent", G_STRUCT_OFFSET( GNCSplitRegClass, reinit_ent_cb ) },
|
||||||
{ DUP_ENT_SIGNAL, "dup_ent", G_STRUCT_OFFSET( GNCSplitRegClass, dup_ent_cb ) },
|
{ DUP_ENT_SIGNAL, "dup_ent", G_STRUCT_OFFSET( GNCSplitRegClass, dup_ent_cb ) },
|
||||||
{ SCHEDULE_ENT_SIGNAL, "schedule_ent", G_STRUCT_OFFSET( GNCSplitRegClass, schedule_ent_cb ) },
|
{ SCHEDULE_ENT_SIGNAL, "schedule_ent", G_STRUCT_OFFSET( GNCSplitRegClass, schedule_ent_cb ) },
|
||||||
{ EXPAND_ENT_SIGNAL, "expand_ent", G_STRUCT_OFFSET( GNCSplitRegClass, expand_ent_cb ) },
|
{ EXPAND_ENT_SIGNAL, "expand_ent", G_STRUCT_OFFSET( GNCSplitRegClass, expand_ent_cb ) },
|
||||||
{ BLANK_SIGNAL, "blank", G_STRUCT_OFFSET( GNCSplitRegClass, blank_cb ) },
|
{ BLANK_SIGNAL, "blank", G_STRUCT_OFFSET( GNCSplitRegClass, blank_cb ) },
|
||||||
{ JUMP_SIGNAL, "jump", G_STRUCT_OFFSET( GNCSplitRegClass, jump_cb ) },
|
{ JUMP_SIGNAL, "jump", G_STRUCT_OFFSET( GNCSplitRegClass, jump_cb ) },
|
||||||
{ CUT_SIGNAL, "cut", G_STRUCT_OFFSET( GNCSplitRegClass, cut_cb ) },
|
{ CUT_SIGNAL, "cut", G_STRUCT_OFFSET( GNCSplitRegClass, cut_cb ) },
|
||||||
{ CUT_TXN_SIGNAL, "cut_txn", G_STRUCT_OFFSET( GNCSplitRegClass, cut_txn_cb ) },
|
{ CUT_TXN_SIGNAL, "cut_txn", G_STRUCT_OFFSET( GNCSplitRegClass, cut_txn_cb ) },
|
||||||
{ COPY_SIGNAL, "copy", G_STRUCT_OFFSET( GNCSplitRegClass, copy_cb ) },
|
{ COPY_SIGNAL, "copy", G_STRUCT_OFFSET( GNCSplitRegClass, copy_cb ) },
|
||||||
{ COPY_TXN_SIGNAL, "copy_txn", G_STRUCT_OFFSET( GNCSplitRegClass, copy_txn_cb ) },
|
{ COPY_TXN_SIGNAL, "copy_txn", G_STRUCT_OFFSET( GNCSplitRegClass, copy_txn_cb ) },
|
||||||
{ PASTE_SIGNAL, "paste", G_STRUCT_OFFSET( GNCSplitRegClass, paste_cb ) },
|
{ PASTE_SIGNAL, "paste", G_STRUCT_OFFSET( GNCSplitRegClass, paste_cb ) },
|
||||||
{ PASTE_TXN_SIGNAL, "paste_txn", G_STRUCT_OFFSET( GNCSplitRegClass, paste_txn_cb ) },
|
{ PASTE_TXN_SIGNAL, "paste_txn", G_STRUCT_OFFSET( GNCSplitRegClass, paste_txn_cb ) },
|
||||||
{ VOID_TXN_SIGNAL, "void_txn", G_STRUCT_OFFSET( GNCSplitRegClass, void_txn_cb ) },
|
{ VOID_TXN_SIGNAL, "void_txn", G_STRUCT_OFFSET( GNCSplitRegClass, void_txn_cb ) },
|
||||||
{ UNVOID_TXN_SIGNAL, "unvoid_txn", G_STRUCT_OFFSET( GNCSplitRegClass, unvoid_txn_cb ) },
|
{ UNVOID_TXN_SIGNAL, "unvoid_txn", G_STRUCT_OFFSET( GNCSplitRegClass, unvoid_txn_cb ) },
|
||||||
{ REVERSE_TXN_SIGNAL, "reverse_txn", G_STRUCT_OFFSET( GNCSplitRegClass, reverse_txn_cb ) },
|
{ REVERSE_TXN_SIGNAL, "reverse_txn", G_STRUCT_OFFSET( GNCSplitRegClass, reverse_txn_cb ) },
|
||||||
{ HELP_CHANGED_SIGNAL, "help-changed", G_STRUCT_OFFSET( GNCSplitRegClass, help_changed_cb ) },
|
{ HELP_CHANGED_SIGNAL, "help-changed", G_STRUCT_OFFSET( GNCSplitRegClass, help_changed_cb ) },
|
||||||
{ INCLUDE_DATE_SIGNAL, "include-date", G_STRUCT_OFFSET( GNCSplitRegClass, include_date_cb ) },
|
{ SHOW_POPUP_MENU_SIGNAL, "show-popup-menu", G_STRUCT_OFFSET( GNCSplitRegClass, show_popup_menu_cb ) },
|
||||||
|
{ INCLUDE_DATE_SIGNAL, "include-date", G_STRUCT_OFFSET( GNCSplitRegClass, include_date_cb ) },
|
||||||
{ LAST_SIGNAL, NULL, 0 }
|
{ LAST_SIGNAL, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -309,6 +312,7 @@ gnc_split_reg_class_init( GNCSplitRegClass *klass )
|
|||||||
klass->reverse_txn_cb = gsr_default_reverse_txn_handler;
|
klass->reverse_txn_cb = gsr_default_reverse_txn_handler;
|
||||||
|
|
||||||
klass->help_changed_cb = NULL;
|
klass->help_changed_cb = NULL;
|
||||||
|
klass->show_popup_menu_cb = NULL;
|
||||||
klass->include_date_cb = NULL;
|
klass->include_date_cb = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -416,6 +420,8 @@ gsr_create_table( GNCSplitReg *gsr )
|
|||||||
G_CALLBACK(gsr_redraw_all_cb), gsr);
|
G_CALLBACK(gsr_redraw_all_cb), gsr);
|
||||||
g_signal_connect (gsr->reg, "redraw_help",
|
g_signal_connect (gsr->reg, "redraw_help",
|
||||||
G_CALLBACK(gsr_emit_help_changed), gsr);
|
G_CALLBACK(gsr_emit_help_changed), gsr);
|
||||||
|
g_signal_connect (gsr->reg, "show_popup_menu",
|
||||||
|
G_CALLBACK(gsr_emit_show_popup_menu), gsr);
|
||||||
|
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
}
|
}
|
||||||
@ -2205,6 +2211,13 @@ gsr_emit_help_changed( GnucashRegister *reg, gpointer user_data )
|
|||||||
gsr_emit_simple_signal( (GNCSplitReg*)user_data, "help-changed" );
|
gsr_emit_simple_signal( (GNCSplitReg*)user_data, "help-changed" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void
|
||||||
|
gsr_emit_show_popup_menu( GnucashRegister *reg, gpointer user_data )
|
||||||
|
{
|
||||||
|
gsr_emit_simple_signal( (GNCSplitReg*)user_data, "show-popup-menu" );
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
gsr_emit_include_date_signal( GNCSplitReg *gsr, time64 date )
|
gsr_emit_include_date_signal( GNCSplitReg *gsr, time64 date )
|
||||||
|
@ -92,26 +92,27 @@ struct _GNCSplitRegClass
|
|||||||
GtkBoxClass parent_class;
|
GtkBoxClass parent_class;
|
||||||
|
|
||||||
/* Signal defaults */
|
/* Signal defaults */
|
||||||
void (*enter_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*enter_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*cancel_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*cancel_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*delete_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*delete_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*reinit_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*reinit_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*dup_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*dup_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*schedule_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*schedule_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*expand_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*expand_ent_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*blank_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*blank_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*jump_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*jump_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*cut_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*cut_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*cut_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*cut_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*copy_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*copy_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*copy_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*copy_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*paste_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*paste_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*paste_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*paste_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*void_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*void_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*unvoid_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*unvoid_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*reverse_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*reverse_txn_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*help_changed_cb) ( GNCSplitReg *w, gpointer user_data );
|
void (*help_changed_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
void (*include_date_cb) ( GNCSplitReg *w, time64 date, gpointer user_data );
|
void (*show_popup_menu_cb) ( GNCSplitReg *w, gpointer user_data );
|
||||||
|
void (*include_date_cb) ( GNCSplitReg *w, time64 date, gpointer user_data );
|
||||||
};
|
};
|
||||||
/* Something somewhere sets these to silly values and causes problems */
|
/* Something somewhere sets these to silly values and causes problems */
|
||||||
#undef DELETE
|
#undef DELETE
|
||||||
|
@ -801,6 +801,22 @@ gnc_item_edit_get_padding_border (GncItemEdit *item_edit, Sides side)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
button_press_cb (GtkWidget *widget, GdkEventButton *event, gpointer *pointer)
|
||||||
|
{
|
||||||
|
GnucashSheet *sheet = GNUCASH_SHEET(pointer);
|
||||||
|
|
||||||
|
/* Ignore double-clicks and triple-clicks */
|
||||||
|
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
||||||
|
{
|
||||||
|
// This is a right click event so over ride entry menu and
|
||||||
|
// display main register popup menu.
|
||||||
|
g_signal_emit_by_name (sheet->reg, "show_popup_menu");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gnc_item_edit_new (GnucashSheet *sheet)
|
gnc_item_edit_new (GnucashSheet *sheet)
|
||||||
{
|
{
|
||||||
@ -867,6 +883,11 @@ gnc_item_edit_new (GnucashSheet *sheet)
|
|||||||
g_signal_connect (item_edit, "draw",
|
g_signal_connect (item_edit, "draw",
|
||||||
G_CALLBACK (draw_background_cb), item_edit);
|
G_CALLBACK (draw_background_cb), item_edit);
|
||||||
|
|
||||||
|
// This call back intercepts the mouse button event so the main
|
||||||
|
// register popup menu can be displayed instead of the entry one.
|
||||||
|
g_signal_connect (item_edit->editor, "button-press-event",
|
||||||
|
G_CALLBACK (button_press_cb), sheet);
|
||||||
|
|
||||||
/* Create the popup button
|
/* Create the popup button
|
||||||
It will only be displayed when the cell being edited provides
|
It will only be displayed when the cell being edited provides
|
||||||
a popup item (like a calendar or account list) */
|
a popup item (like a calendar or account list) */
|
||||||
|
@ -53,6 +53,7 @@ enum
|
|||||||
ACTIVATE_CURSOR,
|
ACTIVATE_CURSOR,
|
||||||
REDRAW_ALL,
|
REDRAW_ALL,
|
||||||
REDRAW_HELP,
|
REDRAW_HELP,
|
||||||
|
SHOW_POPUP_MENU,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,6 +83,7 @@ struct _GnucashRegisterClass
|
|||||||
void (*activate_cursor) (GnucashRegister *reg);
|
void (*activate_cursor) (GnucashRegister *reg);
|
||||||
void (*redraw_all) (GnucashRegister *reg);
|
void (*redraw_all) (GnucashRegister *reg);
|
||||||
void (*redraw_help) (GnucashRegister *reg);
|
void (*redraw_help) (GnucashRegister *reg);
|
||||||
|
void (*show_popup_menu) (GnucashRegister *reg);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Implementation *****************************************************/
|
/** Implementation *****************************************************/
|
||||||
@ -351,9 +353,20 @@ gnucash_register_class_init (GnucashRegisterClass *klass)
|
|||||||
g_cclosure_marshal_VOID__VOID,
|
g_cclosure_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
register_signals[SHOW_POPUP_MENU] =
|
||||||
|
g_signal_new("show_popup_menu",
|
||||||
|
G_TYPE_FROM_CLASS(gobject_class),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
G_STRUCT_OFFSET(GnucashRegisterClass,
|
||||||
|
show_popup_menu),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__VOID,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
klass->activate_cursor = NULL;
|
klass->activate_cursor = NULL;
|
||||||
klass->redraw_all = NULL;
|
klass->redraw_all = NULL;
|
||||||
klass->redraw_help = NULL;
|
klass->redraw_help = NULL;
|
||||||
|
klass->show_popup_menu = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user