summaryrefslogtreecommitdiff
path: root/openbox/prompt.c
AgeCommit message (Collapse)Author
2012-09-30Prompt should not always use the currently focused button as its result (Fix ↵Dana Jansens
bug 5518)
2012-09-30Fix prompt cleanup (was not going through the list correctly when freeing items)Dana Jansens
2011-08-02Separate theme options for osd prompt buttons.Carlos Pita
I managed to keep backwards compatibility without really cluttering the code so here is the patch http://bugzilla.icculus.org/show_bug.cgi?id=4874 too. Please keep in mind that this is my first piece of code for openbox and that I'm not a die hard openbox user (yet), not to tell the patch was not exhaustively tested. Anyway I think it's pretty much in a good shape but any criticism will be welcome. Basically the patch add the following theme options for controlling buttons in osd prompts: %%%% colors % % for the text inside the button osd.button.unpressed.text.color osd.button.pressed.text.color osd.button.focused.text.color % % for the line art around the button % (if you don't wan't the box just make box.color = bg.color) osd.button.pressed.box.color osd.button.focused.box.color %%%% textures % osd.button.unpressed.bg osd.button.pressed.bg osd.button.focused.bg The buttons can be in three states: unpressed: neither clicked nor selected focused: selected but not clicked pressed: clicked (and of course selected) I discarded the previous distinction between press and pfocus as in fact it was only a formal distinction, in that both appearances mimicked each other in every sense. It think that it was just inherited from the way titlebar buttons are managed so I decided to simplify it a bit. All the options default in a way that preserves backwards compatibility: osd.button.unpressed.text.color -> osd.active.label.text.color osd.button.pressed.text.color -> osd.active.label.text.color osd.button.focused.text.color -> osd.active.label.text.color osd.button.pressed.box.color -> window.active.button.pressed.image.color osd.button.focused.box.color -> window.active.button.hover.image.color osd.button.unpressed.bg -> window.active.button.unpressed.bg osd.button.pressed.bg -> window.active.button.pressed.bg osd.button.focused.bg -> window.active.button.hover.bg Notice that a good deal of locs where added to theme.c but in compensation prompt.c is pretty much simpler now because the appearances and textures are created while loading the theme.
2011-08-02Merge branch 'm4/master'Mikael Magnusson
2011-08-02Revert these two commits temporarily to make the buttons merge easierMikael Magnusson
1e427a3358deeadf8abc326e714ee201fddc43d6 2288da0ae3b44c987687e3deeb7864fcb7b23bb9
2011-08-01Separate theme options for osd prompt buttons.Carlos Pita
I managed to keep backwards compatibility without really cluttering the code so here is the patch http://bugzilla.icculus.org/show_bug.cgi?id=4874 too. Please keep in mind that this is my first piece of code for openbox and that I'm not a die hard openbox user (yet), not to tell the patch was not exhaustively tested. Anyway I think it's pretty much in a good shape but any criticism will be welcome. Basically the patch add the following theme options for controlling buttons in osd prompts: %%%% colors % % for the text inside the button osd.button.unpressed.text.color osd.button.pressed.text.color osd.button.focused.text.color % % for the line art around the button % (if you don't wan't the box just make box.color = bg.color) osd.button.pressed.box.color osd.button.focused.box.color %%%% textures % osd.button.unpressed.bg osd.button.pressed.bg osd.button.focused.bg The buttons can be in three states: unpressed: neither clicked nor selected focused: selected but not clicked pressed: clicked (and of course selected) I discarded the previous distinction between press and pfocus as in fact it was only a formal distinction, in that both appearances mimicked each other in every sense. It think that it was just inherited from the way titlebar buttons are managed so I decided to simplify it a bit. All the options default in a way that preserves backwards compatibility: osd.button.unpressed.text.color -> osd.active.label.text.color osd.button.pressed.text.color -> osd.active.label.text.color osd.button.focused.text.color -> osd.active.label.text.color osd.button.pressed.box.color -> window.active.button.pressed.image.color osd.button.focused.box.color -> window.active.button.hover.image.color osd.button.unpressed.bg -> window.active.button.unpressed.bg osd.button.pressed.bg -> window.active.button.pressed.bg osd.button.focused.bg -> window.active.button.hover.bg Notice that a good deal of locs where added to theme.c but in compensation prompt.c is pretty much simpler now because the appearances and textures are created while loading the theme.
2011-01-24Handle STRING and COMPOUND_TEXT type text properties.Dana Jansens
STRING should be latin1 text (plus TAB and LF) COMPOUND_TEXT should be encoded in the current locale.
2010-10-14cleaning up remnants of bad rebase merges and modernizing some sectionsDave Foster
2010-04-16event_curtime is replaced (publicly) by event_time()Dana Jansens
This function never returns CurrentTime, which is nice, cuz using CurrentTime for XSetFocus always sucks. If the current XEvent did not have a timestamp, then event_time() will find one. It finds the first timestamp available in the X event queue, meaning the earliest timestamp >= the current (nontimestamped) event. All future events should have a timestamp >= event_time(), so using this in XSetFocus() should not mess up any future calls we make to it. This change seems to work well, as it appears to fix bug #3648.
2010-04-16use const Rect* not Rect const*Dana Jansens
2010-03-25make keypad enter do the same thing as returnDana Jansens
2010-02-16more using g_slice_new() instead of g_new()Dana Jansens
2010-02-12remove a bunch of g_new()/g_free() by returning Rect const*'s from screen ↵Dana Jansens
area functions when possible
2010-02-11make control keys work in menus/dialogs/etc with the new obt code, using ↵Dana Jansens
XLookup stuff
2010-02-11make obt translate keypress events to a valid utf8 character (note this ↵Dana Jansens
makes openbox not compile)
2010-02-11don't strip the state for keyboard eventsDana Jansens
this allows translation of keys not in the base keyboard layout
2010-01-08Don't handle input events on prompts if they should be used for a ↵Dana Jansens
binding/menu instead. Also, be more careful about making the prompt buttons look pressed, don't make them pressed from a motion notify event if they didnt first handle the press.
2009-12-21Add themeing options for inactive osd labels, osd.inactive.label.*Dana Jansens
(rename the current osd label options from osd.label to osd.active.label, similar to the window.(in)?active.label options.
2009-12-16Merge branch 'backport' into workDana Jansens
Conflicts: obt/keyboard.c obt/keyboard.h openbox/event.c openbox/menuframe.c openbox/moveresize.c openbox/openbox.c openbox/screen.c
2009-12-14Allow the user to bind more than one keycode to a keysym for Ob ↵Dana Jansens
Menus/Move/Resize If the user has escape bound to more than one keycode then they can use any of them to close a menu. This change applies to the hardcoded keys in openbox, which are used for the menus and for move/resize, and maybe other places.
2009-11-07Make clang happierMikael Magnusson
Add asserts to default: in switch statements Store pointed to variables locally so it knows they don't change Remove some dead assignments Mark ob_exit_with_error as noreturn Use "%s", msg instead of just msg to printf style functions Use the c_pfocus variable
2008-03-08Merge branch 'backport' into workMikael Magnusson
Conflicts: obt/keyboard.c openbox/actions/cyclewindows.c openbox/actions/directionalwindows.c openbox/frame.c openbox/openbox.c
2008-03-08Remove double newlines.Mikael Magnusson
2008-03-02Merge branch 'backport' into workDana Jansens
Conflicts: openbox/actions/execute.c openbox/event.c openbox/openbox.c openbox/openbox.h
2008-03-02allow prompts to have titles specified. show a prompt when there are syntax ↵Dana Jansens
errors in the xml config files.
2008-03-02add a cleanup callback to the prompt interface. when the prompt's callback ↵Dana Jansens
returns TRUE, then the cleanup function is called. likewise when the prompt system is shutdown (openbox is exiting), then the cleanup function is also called. it should unref/destroy the prompt and any memory associated with it
2008-03-02Merge branch 'backport' into workDana Jansens
2008-03-02make code to show a prompt when you just want to display and message and not ↵Dana Jansens
do anything when the user presses the button
2008-03-02Merge branch 'backport' into workDana Jansens
Conflicts: openbox/actions/all.h openbox/event.c openbox/prompt.c
2008-03-01remove some debug printsDana Jansens
2008-02-22Merge branch 'backport' into workDana Jansens
Conflicts: openbox/menuframe.c openbox/prompt.c openbox/prop.c openbox/prop.h
2008-02-22Let ObPrompts be modal dialogs, and when they are transient for a window, ↵Dana Jansens
make it transient for its entire group, so it can be stacked at the highest level above other transients
2008-02-18Merge branch 'backport' into workDana Jansens
Conflicts: openbox/grab.c openbox/keyboard.c
2008-02-18the focus indicator line for prompt buttons wasn't being displayed, since ↵Dana Jansens
the texture type was no longer being set
2008-02-14draw a box inside the key-focused button in an ObPrompt. also fix rendering ↵Dana Jansens
the buttons when they are parent-relative.
2008-02-14make ObPrompts resize and redraw correctly when reconfiguring and changing ↵Dana Jansens
themes with them open
2008-02-14use the hover and press button colors (this was a bug)Dana Jansens
2008-02-14if a prompt is already showing and you try show it again, then make it ↵Dana Jansens
active. in the "kill this?" prompt use the window's original title without any of the openbox-appended-ness
2008-02-14prompt to kill windows when they are not respondingDana Jansens
2008-02-14let you specify return codes for the different buttons in a prompt, and ↵Dana Jansens
specify a callback function for the prompt for when it is closed
2008-02-14position the buttons in the bottom right instead of centering themDana Jansens
2008-02-14key input works for ObPrompt windows nowDana Jansens
2008-02-14make the prompt buttons respond to button presses. keyboard input code is ↵Dana Jansens
there too but not working yet.
2008-02-14properly place the msg textureDana Jansens
2008-02-14Make ObPrompt windows get managed as clients, and make them able to ↵Dana Jansens
reconfigure as well.
2008-02-14give prompts a border, and fix how they are laid out. and make them use the ↵Dana Jansens
multi-line text capabilities in render for the message
2008-02-14you can create dialog windows called "prompts" which have a message and some ↵Dana Jansens
buttons! they don't do anything interesting yet.
2008-02-14draw a box inside the key-focused button in an ObPrompt. also fix rendering ↵Dana Jansens
the buttons when they are parent-relative.
2008-02-14make ObPrompts resize and redraw correctly when reconfiguring and changing ↵Dana Jansens
themes with them open
2008-02-07use the hover and press button colors (this was a bug)Dana Jansens