mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +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
|
||||
#ifndef _WIN32
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
GdkBitmap *mask;
|
||||
load_pixmap( "icon.bmp", window, &pixmap, &mask );
|
||||
gdk_window_set_icon( window->window, NULL, pixmap, mask );
|
||||
CString icon = g_strBitmapsPath;
|
||||
icon += "icon.png";
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue