Make gnc_tab_clicked_cb static

pull/2030/head
Roberto Kok 2 years ago
parent 8773b0d45e
commit 56fafe05e6

@ -1607,6 +1607,33 @@ gnc_main_window_update_all_titles (void)
nullptr);
}
/* Callback function invoked when the user clicks on a GtkNotebook tab.
*
* This function is needed to make it possible to close a tab
* when it's clicked using the middle mouse button;
* there does not seem to be a way to do this with GtkNotebook natively.
*
* @param widget The event box in the tab, which was clicked.
*
* @param event The event parameter describing where on the screen
* the mouse was pointing when clicked, type of click, modifiers,
* etc.
*
* @param page This is the GncPluginPage corresponding to the tab.
*
* @return Returns TRUE if this was a middle-click, meaning Gnucash
* handled the click.
*/
static gboolean
gnc_tab_clicked_cb(GtkWidget *widget, GdkEventButton *event, GncPluginPage *page) {
if (event->type == GDK_BUTTON_PRESS && event->button == 2)
{
gnc_main_window_close_page(page);
return TRUE;
}
return FALSE;
}
static void
gnc_main_window_book_dirty_cb (QofBook *book,
gboolean dirty,
@ -5666,22 +5693,6 @@ gnc_main_window_button_press_cb (GtkWidget *whatever,
return FALSE;
}
/* Callback function invoked when the user clicks on a GtkNotebook tab.
*
* This function is needed to make it possible to close a tab
* when it's clicked using the middle mouse button;
* there does not seem to be a way to do this with GtkNotebook natively.
*/
gboolean
gnc_tab_clicked_cb(GtkWidget *widget, GdkEventButton *event, GncPluginPage *page) {
if (event->type == GDK_BUTTON_PRESS && event->button == 2)
{
gnc_main_window_close_page(page);
return TRUE;
}
return FALSE;
}
void
gnc_main_window_all_action_set_sensitive (const gchar *action_name,
gboolean sensitive)

@ -415,26 +415,6 @@ gboolean gnc_main_window_button_press_cb (GtkWidget *whatever,
GdkEventButton *event,
GncPluginPage *page);
/* Callback function invoked when the user clicks on a GtkNotebook tab.
*
* This function is needed to make it possible to close a tab
* when it's clicked using the middle mouse button;
* there does not seem to be a way to do this with GtkNotebook natively.
*
* @param widget The event box in the tab, which was clicked.
*
* @param event The event parameter describing where on the screen
* the mouse was pointing when clicked, type of click, modifiers,
* etc.
*
* @param page This is the GncPluginPage corresponding to the tab.
*
* @return Returns TRUE if this was a middle-click, meaning Gnucash
* handled the click.
*/
gboolean
gnc_tab_clicked_cb(GtkWidget *widget, GdkEventButton *event, 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).

Loading…
Cancel
Save