User:Generalantilles/rm you

(Emails from Timeless concerning GTK stuff with applets:)
(Emails from Timeless concerning GTK stuff with applets:)
Line 2: Line 2:
Check out [http://adv-backlight.garage.maemo.org Advanced Backlight Statusbar Applet]!  
Check out [http://adv-backlight.garage.maemo.org Advanced Backlight Statusbar Applet]!  
 +
 +
 +
 +
 +
 +
===IRC with Timeless concerning GTK stuff with the sound applet:===
 +
timeless: Searching...
 +
timeless: ok
 +
timeless: Found one matching line
 +
rm_you: and then once you know what the name of that object is, find what container they add it to
 +
rm_you: then all I need to know is what type of container it is
 +
timeless: it gets munged by gtk_box_pack_start
 +
rm_you: gtk_box_pack_start... ok
 +
rm_you: into what kind of box
 +
rm_you: and what does that box get added to
 +
timeless: gtk_vbox_new (false, 5)
 +
timeless: and into the soundwindow, whatever that is
 +
rm_you: ok, so they put the "hildon_hvolumebar_new" object into a "gtk_vbox_new" object
 +
rm_you: and that gets added to... a "soundwindow"?
 +
timeless: g_object_new (... "statusbar-item" ...)
 +
rm_you: ... what?
 +
timeless: yeah a SOUND_TYPE_WINDOW
 +
rm_you: can you do a search for "gtk_menu"
 +
timeless: oh. yeah, essentially this reimplements and delegates to things :)
 +
rm_you: ?
 +
timeless: basically the sound_window thing acts almost like a gtkmenu container
 +
timeless: and special handles things to make it all work :)
 +
rm_you: ....
 +
timeless: e.g. it has a set_focus method which will call gtk_menu_item_(de)select on things
 +
rm_you: so
 +
rm_you: but
 +
rm_you: but
 +
rm_you: but
 +
rm_you: WHAT!?
 +
timeless: sorry, I'm definately not copying the rest of the code
 +
timeless: (gone)

Revision as of 11:05, 10 June 2008

Hey, it's rm_you!

Check out Advanced Backlight Statusbar Applet!



IRC with Timeless concerning GTK stuff with the sound applet:

timeless: Searching... timeless: ok timeless: Found one matching line rm_you: and then once you know what the name of that object is, find what container they add it to rm_you: then all I need to know is what type of container it is timeless: it gets munged by gtk_box_pack_start rm_you: gtk_box_pack_start... ok rm_you: into what kind of box rm_you: and what does that box get added to timeless: gtk_vbox_new (false, 5) timeless: and into the soundwindow, whatever that is rm_you: ok, so they put the "hildon_hvolumebar_new" object into a "gtk_vbox_new" object rm_you: and that gets added to... a "soundwindow"? timeless: g_object_new (... "statusbar-item" ...) rm_you: ... what? timeless: yeah a SOUND_TYPE_WINDOW rm_you: can you do a search for "gtk_menu" timeless: oh. yeah, essentially this reimplements and delegates to things :) rm_you: ? timeless: basically the sound_window thing acts almost like a gtkmenu container timeless: and special handles things to make it all work :) rm_you: .... timeless: e.g. it has a set_focus method which will call gtk_menu_item_(de)select on things rm_you: so rm_you: but rm_you: but rm_you: but rm_you: WHAT!? timeless: sorry, I'm definately not copying the rest of the code timeless: (gone)



Emails from Timeless concerning GTK stuff with applets:

On Wed, May 7, 2008 at 7:38 AM, Adam Harwell <aharwell at trinity.edu> wrote:

>> The binary package osso-statusbar-sound contains a statusbar applet that can

>> be used to control the volume level of the system. It consists primarily of

>> some GtkContainer or HildonContainer object that can be used as a

>> popup/popdown menu. That object then contains a "hildon_hvolumebar" as well

>> as a menu item of some kind that launches the sound configuration

>> controlpanel applet.

>>

>> Currently I am using a "hildon_desktop_popup_window". This sort of works,


what follows is JavaScript notation based on C GObject code.


function SoundWindow() {

var box = new gtk["vbox"];

gtk["container"].add (this, box);

box.pack([volumebar, ...]);

}

SoundWindow.prototype = {

type_hint: GDK_WINDOW_TYPE_HINT_MENU,

name: "hildon-status-bar-popup",

resizable: false,

decorated: false,

/* i think this is the cute border you're asking about, and yes, it

seems like it's just hard coded into the C */

border_width: 20,

keep_above: true

}



fwiw, the same general approach is used by the display applet.

>> but it lacks the nice thick border and rounded corners that the default

>> sound applet uses, as well as some intelligent autoclose functions. Can you

>> find out if there is some kind of hildon container that is being used for

>> the default sound applet?