remove more of deprecated Gtk stuff

This commit is contained in:
Garux 2020-06-05 20:40:12 +03:00
parent d46aaf514d
commit e357564ff8
4 changed files with 6 additions and 7 deletions

View File

@ -640,7 +640,7 @@ static void ReadDlgValues( int tab ){
// =============================================================================
// main dialog callbacks
static void switch_page( GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer data ){
static void switch_page( GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer data ){
if ( current_tab != page_num ) {
if ( page_num == FIXPOINTS_TAB ) {
OldPreview = Preview;

View File

@ -245,7 +245,6 @@ void DoConfigDialog(){
GtkWidget *transslider, *translabel, *clipslider, *cliplabel;
GtkWidget *show2check, *show3check, *portalcheck;
int loop = 1, ret = IDCANCEL;
GtkObject *adj;
dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pRadiantWnd ) );
@ -277,7 +276,7 @@ void DoConfigDialog(){
gtk_widget_show( hbox );
gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, TRUE, 0 );
adj = gtk_adjustment_new( portals.width_3d, 2, 40, 1, 1, 0 );
auto *adj = gtk_adjustment_new( portals.width_3d, 2, 40, 1, 1, 0 );
lw3slider = gtk_hscale_new( GTK_ADJUSTMENT( adj ) );
gtk_widget_show( lw3slider );
gtk_box_pack_start( GTK_BOX( hbox ), lw3slider, TRUE, TRUE, 0 );

View File

@ -111,11 +111,11 @@ static void clipboard_clear( GtkClipboard *clipboard, gpointer data ){
}
static void clipboard_received( GtkClipboard *clipboard, GtkSelectionData *data, gpointer user_data ){
if ( data->length < 0 ) {
if ( gtk_selection_data_get_length( data ) < 0 ) {
globalErrorStream() << "Error retrieving selection\n";
}
else if ( strcmp( gdk_atom_name( data->type ), clipboard_targets[0].target ) == 0 ) {
BufferInputStream istream( reinterpret_cast<const char*>( data->data ), data->length );
else if ( strcmp( gdk_atom_name( gtk_selection_data_get_data_type( data ) ), clipboard_targets[0].target ) == 0 ) {
BufferInputStream istream( reinterpret_cast<const char*>( gtk_selection_data_get_data( data ) ), gtk_selection_data_get_length( data ) );
( *reinterpret_cast<ClipboardPasteFunc*>( user_data ) )( istream );
}
}

View File

@ -84,7 +84,7 @@ void GroupDialog_updatePageTitle( GtkWindow* window, std::size_t pageIndex ){
}
}
static gboolean switch_page( GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer data ){
static gboolean switch_page( GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer data ){
GroupDialog_updatePageTitle( GTK_WINDOW( data ), page_num );
g_current_page = page_num;