mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Replace deprecated functions in gnc_cell_renderer_date
This still needs more work as there appears to be a size issue and a missing procedure. As this is not used currently, will fix in a later commit.
This commit is contained in:
parent
5cd60d2e58
commit
00f6977fcc
@ -433,27 +433,6 @@ gcrd_day_selected (GtkWidget *popup_window, GncCellRendererDate *cell)
|
||||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gcrd_grab_on_window (GdkWindow *window,
|
||||
guint32 activate_time)
|
||||
{
|
||||
if ((gdk_pointer_grab (window, TRUE,
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK,
|
||||
NULL, NULL, activate_time) == 0)) {
|
||||
if (gdk_keyboard_grab (window, TRUE,
|
||||
activate_time) == 0)
|
||||
return TRUE;
|
||||
else {
|
||||
gdk_pointer_ungrab (activate_time);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* This function converts a time64 value date to separate entities */
|
||||
gboolean
|
||||
gcrd_time2dmy (time64 raw_time, gint *day, gint *month, gint *year)
|
||||
@ -514,7 +493,3 @@ gcrd_string_dmy2time (const gchar *date_string)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -305,7 +305,7 @@ gnc_popup_get_button_width (void)
|
||||
gtk_window_move (GTK_WINDOW (window), -500, -500);
|
||||
gtk_widget_show (window);
|
||||
|
||||
gtk_widget_size_request (window, &req);
|
||||
gtk_widget_get_preferred_size (window, &req, NULL);
|
||||
|
||||
width = req.width;
|
||||
|
||||
|
@ -215,21 +215,25 @@ static gboolean
|
||||
gcrp_grab_on_window (GdkWindow *window,
|
||||
guint32 activate_time)
|
||||
{
|
||||
if ((gdk_pointer_grab (window, TRUE,
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK,
|
||||
NULL, NULL, activate_time) == 0)) {
|
||||
if (gdk_keyboard_grab (window, TRUE,
|
||||
activate_time) == 0)
|
||||
return TRUE;
|
||||
else {
|
||||
gdk_pointer_ungrab (activate_time);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
GdkDisplay *display = gdk_display_get_default ();
|
||||
GdkDeviceManager *dm = gdk_display_get_device_manager (display);
|
||||
GdkDevice *device = gdk_device_manager_get_client_pointer (dm);
|
||||
|
||||
return FALSE;
|
||||
if ((gdk_device_grab (device, window, GDK_OWNERSHIP_WINDOW, TRUE,
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK,
|
||||
NULL, activate_time) == 0)) {
|
||||
|
||||
if (gdk_device_grab (device, window, GDK_OWNERSHIP_WINDOW, TRUE,
|
||||
GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK,
|
||||
NULL, activate_time) == 0)
|
||||
return TRUE;
|
||||
else {
|
||||
gdk_device_ungrab (device, activate_time);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -336,7 +340,7 @@ gcrp_arrow_clicked (GtkCellEditable *entry,
|
||||
gnc_cell_renderer_popup_hide (cell);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
path = g_object_get_data (G_OBJECT (entry),
|
||||
GNC_CELL_RENDERER_POPUP_PATH);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user