Re: [gnotepad-users] Fix patch for gnotepad+-1.2.0
Brought to you by:
ackahn
From: Andy K. <ac...@ne...> - 2000-03-14 18:23:00
|
Yoichi, > Sorry for my too rough explanation. My default setup is > background white, foreground black. But using Gtk+ theme, > "Untitled" buffer on starting up does not obey it. > > Please try this below: > > 1. Use Gtk+ theme whose GtkText background is not white. > For example, "ThinIce". Its default background color is > "#e5e5f7". > > 2. Start gnp. "Untitled" buffer's background is "#e5e5f7", > though appgtkrc contains "bg[NORMAL] = { 1.0, 1.0, 1.0 }". > > 3. Start prefs dialog and save setup. "Untitled" buffer's > background is now white. Ah, I now understand the problem you're experiencing. I was not experiencing the same problem because I do not use a theme which alters the GtkText widget's colors. In looking at your patch which addresses this problem: --- src/main.c.orig Sat Mar 11 18:26:36 2000 +++ src/main.c Sat Mar 11 19:34:20 2000 @@ -176,6 +176,7 @@ app_init(int num, char **files, bool_t do_splash) { win_t *w; + doc_t *d; GNPDBG_GENERIC(("app_init: files to open = %d\n", num)); @@ -186,6 +187,8 @@ if (*files == NULL) { doc_new(w, NULL, DocText, (DO_LOAD | UPDATE_TITLE)); gtk_widget_show(w->toplev); + d = DOC_CURRENT(w); + prefs_update_text_widget_style(GTK_WIDGET(d->data)); /* * setting the switch page signal here is kind of hokey, but we I think it would be a little cleaner by simplifying it to just: if (*files == NULL) { doc_new(w, NULL, DocText, (DO_LOAD | UPDATE_TITLE)); gtk_widget_show(w->toplev); + doc_redraw(DOC_CURRENT(w)); /* * setting the switch page signal here is kind of hokey, but we However, I'm still uncertain as to why the problem is even manifesting itself. That is, from inspecting the code, I don't see anything that comes after the creation of an untitled doc that would cause the properties of the text widget to change. > # By the way, how can I use mouse wheel on gnotepad+? I cannot > # do wheel scroll with mouse pointer on text widget. > # When pointer is on the scrollbar, I can scroll. I have no idea here. Supposedly, GTK has support for wheeled mice. Perhaps there is something that needs to be done in gnotepad that can trigger the support correctly. regards, --andy |