misc questions



sorry about the blank post

I'm writing a program that has both gnome and plain gtk+ ports, and I want to
provide the same features in both. I've been storing my own config and session
info instead of using gnomes session-manager and gnome-config. I'm having some
problems with a couple things, and was hoping someone could help me out (yeah,
I know this is a gnome list and these are gtk+ questions, but I haven't 
re-subscribed to the gtk+ list after my mailserver was down for a weekend)

Window placement and size: GtkWindow doesn't seem to have an easy way to get
geometry information. Am I just plain stupid and looking in the wrong place?
Would it be acceptable to use gtk+ style geometry handling for gnome session
type stuff, or should I write in gnome style session handling in addition to
plain gtk+?

Bypassing themes: I like using gtk+ themes, but I need to control the background
of a GtkText area over-riding my default theme. I've tried hacking up a quick
gtkrc file to bypass it, and I've tried to over-ride it in my code, but no luck.
I'd like to put in some kinda widget to allow users to select the background
color and/or pixmap. (I can force the color on a non-pixmap theme, but those
pixmap themes are so beautiful... :)

Session management: The docs on session management aren't very clear on what
really needs to be saved with the session. I know some apps need different
things saved, but there should be a set of information common to all gnome apps,
 that I'm not totally clear on. 

Autoconf: this one's really stupid :) is there a good way to detect where to put
the help, desktop, and image files? Last tiem I actually compiled gnome, it
defaulted to /usr/local (.30 cvs). I've been using the debian packages which
default to /usr. Both ways make sense to me how they're done, but if someone
downloads and installs my software, I want it to put itself in the right places
without making people hunt down where their install is. My concern is for newbie
and neophyte users who're used to that other os which has static places where
the desktop files *WILL* be, so they get that brainless dropin install. If there
isn't a slick cool way to automagically detect that, should it default to 
/usr/local ?

Text changes: this is another plain gtk+, sorry. When I change my font size for
my GtkText boxes, sometimes it doesn't change all the text to the new font. When
it does, it doesn't alter the spacing, and sometimes doesn't erase the old text.
Resizing the window usually changes some things around some... Is there any
function to sync the window so everything shows up in the new text (and color?)
seamlessly?

Config files: I've been using ~/.bmud/ for my config files. Is this blatantly
breaking some gnome convention? Should I plan on converting the gnome port to
use gnome-config when gnome-config is finished? Or should I attempt to keep
the gnome and gtk+ ports using the same files? I don't wanna confuse someone
who has a box with gnome and one without and is playing iwth my program :)

Scripting language: mud clients have to have scripting languages, and I'm running
a poll to see which one I should use. Perl seems to be the choice so far. If I
do end up implementing perl, how important would putting in something like
gtkperl or gnomeperl?

GtkText: another stupid gtk+ question. I quit messing with gtk+ and gnome a
while ago, when gnome .30 just got into cvs. There was a lot of talk about
gtktext being changed, removed, or something. was there anything resulting from
those talks?

Ok, thos're all my stupid questions :) now I got some comments and observations
if you don't mind.

Gnomes coming along real nicely, it's stable and fairly fast. It seems fairly
heavy memorywise, tho :( I only got 48m ram, when ya add on netscape, X, and
all the other stuff, the gnome stuff goes straight into swap. Panel sits on like
4-10 megs, then there's half a dozen background things each sucking up a couple
megs. I think the nicer gnome is memorywise, the better it'll be all around. Has
there been serious efforts to reduce its memory footprints? Shared memory and
service brokering can cut memory consumption down a lot (I know gnome does both,
but could it do more/better?). 

Ok, I got another question (no, I'm not trying to write a book, why do you ask?)
I asked a while ago about possable causes to my color crashing problem. I did
some bughunting and backtracing in both gnome and gtk+ versions. I'm pretty sure
it's a problem with allocating colors or the cmap. The backtraces confuse me, I
don't understand the internals of gnome and gtk+ that well.

the gtk+ version gives this
(when I try to open the font dialog)

Program received signal SIGSEGV, Segmentation fault.
0x402a3844 in strncmp ()
(gdb) back
#0  0x402a3844 in strncmp ()
#1  0x4027dfb5 in getenv ()
#2  0x40279900 in   ()
#3  0x402790c7 in   ()
#4  0x4007d92b in gtk_font_selection_get_type ()
#5  0x400f5ed9 in gtk_type_new ()
#6  0x4007f44b in gtk_font_selection_new ()

(plus a bunch other)

and the gnome version does this on startup

0x403f7844 in strncmp ()
(gdb) back
#0  0x403f7844 in strncmp ()
#1  0x403d1fb5 in getenv ()
#2  0x4034b3e3 in gnome_url_show ()
#3  0x4034b679 in gnome_config_file ()
#4  0x40341af8 in   ()
#5  0x40342c75 in   ()
#6  0x4002e9dd in gnome_animator_get_playback_speed ()
#7  0x4002ec3f in gnome_app_get_type ()
#8  0x402282ad in   ()
#9  0x401e8cb3 in gtk_signal_set_funcs ()
#10 0x401e6dbf in gtk_signal_emit ()
#11 0x4021b3c8 in gtk_widget_show ()
#12 0x804e7ea in main (argc=1, argv=0xbffffd34) at main.c:33


The only similarity I can tell is that they both call getenv, I'm not sure which
environment variable they're trying to grab, but it crashes out in strncmp :/
I'm sure this is something I can fix in my code, but for general robustness, is
this something gnome, gtk+, or glibc2 should be aware of? (if I need to tell
someone, who do I tell? :)

I wish I had skills at writing docs or was better at code so I could help gnome
more directly :) I've been a fan of it since .10 came out, it kicks ass :)

        -Erik <br0ke@math.smsu.edu> [http://shells.clipboard.com/~br0ke]

The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep
Refrigerated.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]