From: Livio B. S. <li...@li...> - 2000-12-26 06:04:17
|
Hi guys, I've recently joined gtk list at gtk...@gn..., and learned the proper way of finding out a window's dimension. I was getting: window->allocation.width window->alloction.height in the patch I sent to make a new windows the same as parent one. Seems that the "right" way to do it is calling `gdk_window_get_size()`. I've already sent a patch to Jorge fixing this up.. sorry guys. While I was on that "theme", I started to think about making an option in dillorc for initial geometry size, because the first thing I do when I open Dillo, is resize it... So that's what I've done. But I'm not sure the patch is good, specially the string manipulations I've done to extract width and height. The patch is at (I'm not sending it attached since it's 5k == 130 lines long): http://www.linux.ime.usp.br/~livio/dillo/geometry_pref.diff The sintax in your dillorc, should be something like: > geometry="800x600" The patch changes the following files: dillorc: added comments and the above example commands.c: changes the window size method to `gdk_window_get_size()', like described abouve. dillo.c: changed window initialization to get the preference size. prefs.c: humm... did it! Look at my string stuff to see if I'm doing it right prefs.h: added > #define DW_GEOMETRY_DEFAULT_WIDTH 640 > #define DW_GEOMETRY_DEFAULT_HEIGHT 550 and `width' and `height' in struct _DilloPrefs. That's all... hope you like it (I did, don't have to keep resizing dillo no more!) best regards, -- Livio <li...@li...> |