mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-02-03 07:01:14 +00:00
Use newer, simpler API to set window icon, and update window icon with current branding (affects Mac / Linux only).
This commit is contained in:
parent
2bd349d6c6
commit
fad4aff018
2 changed files with 10 additions and 4 deletions
Binary file not shown.
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 10 KiB |
|
@ -2499,10 +2499,16 @@ void MainFrame::Create(){
|
||||||
// not needed on win32, it's in the .rc
|
// not needed on win32, it's in the .rc
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
{
|
{
|
||||||
GdkPixmap *pixmap;
|
CString icon = g_strBitmapsPath;
|
||||||
GdkBitmap *mask;
|
icon += "icon.png";
|
||||||
load_pixmap( "icon.bmp", window, &pixmap, &mask );
|
|
||||||
gdk_window_set_icon( window->window, NULL, pixmap, mask );
|
GError *error = NULL;
|
||||||
|
|
||||||
|
gtk_window_set_icon_from_file( GTK_WINDOW( window ), icon.GetBuffer(), &error );
|
||||||
|
if ( error != NULL ) {
|
||||||
|
Sys_Printf( "Failed to load icon: %s\n", error->message );
|
||||||
|
g_error_free( error );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue