-
-
Save mtwebster/c6db7b15cd52bf88dc9db1ff089830a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libxapp/xapp-gtk3-module.c b/libxapp/xapp-gtk3-module.c | |
index 99ac9e4..7eb5cc8 100644 | |
--- a/libxapp/xapp-gtk3-module.c | |
+++ b/libxapp/xapp-gtk3-module.c | |
@@ -19,6 +19,7 @@ | |
void gtk_module_init (gint *argc, gchar ***argv[]); | |
static void (* original_sidebar_constructed) (GObject *object); | |
+static void (* original_window_constructed) (GObject *object); | |
static void | |
xapp_sidebar_constructed (GObject *object) | |
@@ -46,6 +47,20 @@ xapp_sidebar_constructed (GObject *object) | |
g_object_unref (fav_settings); | |
} | |
+static void | |
+on_window_title_changed (GtkWindow *window) | |
+{ | |
+ gtk_window_set_icon_from_file (window, "/home/mtwebster/.local/share/ice/icons/fftest.png", NULL); | |
+} | |
+ | |
+static void | |
+gtk_window_constructed (GObject *object) | |
+{ | |
+ (* original_window_constructed) (object); | |
+ | |
+ g_signal_connect_swapped (object, "notify::title", G_CALLBACK (on_window_title_changed), object); | |
+} | |
+ | |
G_MODULE_EXPORT void gtk_module_init (gint *argc, gchar ***argv[]) { | |
GObjectClass *object_class; | |
@@ -58,6 +73,13 @@ G_MODULE_EXPORT void gtk_module_init (gint *argc, gchar ***argv[]) { | |
original_sidebar_constructed = object_class->constructed; | |
object_class->constructed = xapp_sidebar_constructed; | |
+ | |
+ GObjectClass *win_class; | |
+ | |
+ win_class = g_type_class_ref (GTK_TYPE_WINDOW); | |
+ | |
+ original_window_constructed = win_class->constructed; | |
+ win_class->constructed = gtk_window_constructed; | |
} | |
G_MODULE_EXPORT gchar* g_module_check_init (GModule *module); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment