2007-08-02 Thomas Thurman <thomas@thurman.org.uk>
Move "close" to bottom of window menu; allow workspace list to appear
at any position in the menu. Closes#104026.
* src/menu.c (MetaMenuItemType): added new MENU_ITEM_WORKSPACE_LIST
item.
* src/menu.c (menuitems): reordered "close", added a workspace list.
* src/menu.c (menu_item_new): return null for workspace lists.
* src/menu.c (meta_window_menu_new): handle workspace lists.
svn path=/trunk/; revision=3283
2007-05-25 Yair Hershkovitz <yairhr@yahoo.com>
* src/workspace.c (meta_workspace_get_neighbor): Add support
for RTL languages so that alt-tab, etc., go the other way.
* src/keybindings.c (handle_activate_menu): In RTL locales,
pop up the menu on the right-hand side when the menu keystroke
is pressed.
* src/fixedtip.c (meta_fixed_tip_show): right-justify tooltips
in RTL locales.
* src/menu.c (popup_position_func): popup menus in RTL locales
are flush with the right-hand side of the window where possible.
* src/frames.c (show_tip_now, meta_frames_button_press_event):
tooltips are aligned with the right-hand side of buttons in
RTL locales.
* src/ui.[ch] (meta_ui_get_direction, enum MetaUIDirection):
New content.
* src/window.c (meta_window_show_menu): "move left" appears above
"move right" in the window menu for LTR locales, and vice versa
for RTL locales.
This is all to close bug #387893.
svn path=/trunk/; revision=3222
2007-04-15 Elijah Newren <newren gmail com>
Remove incorrect usage of window.h from menu.c. See #426791 &
#382962.
* src/menu.c (enum MetaMenuItemType, variable menuitems,
meta_menu_item_new):
cleanup: add a MENU_ITEM_RADIOBUTTON for the sticky stuff
* src/menu.c (variable menuitems):
* src/core.c (meta_core_get_menu_accelerator):
* src/window.c (menu_callback, meta_window_show_menu):
* src/common.h (enum MetaMenuOp):
reinstate META_MENU_OP_UNABOVE
* src/menu.c (meta_window_menu_new):
remove hacks (using inappropriate data) for STICK/UNSTICK/ABOVE
and clean it up while just setting STICK/UNSTICK activeness as
necessary
* src/menu.[ch] (meta_window_menu_new):
* src/ui.[ch] (meta_ui_window_menu_new):
make the active_workspace parameter an unsigned long
2007-04-15 Bruno Boaventura <brunobol@gnome.org>
* src/menu.c (meta_window_menu_new): don't show the current
workspace as a possible workspace to switch to. Fixes#426791.
svn path=/trunk/; revision=3196
2006-12-27 Bruno Boaventura <brunoboaventura@gmail.com>
Move "On Top" option in menu. Fix#382962.
* src/common.h, src/core.c: Remove META_MENU_OP_UNABOVE.
* src/menu.c: remove unabove menu item and put above item
next "Always on Visible Viewport".
* src/window.c: remove handles of META_MENU_OP_UNABOVE.
2006-11-15 Bruno Boaventura <brunoboaventura@gmail.com>
2006-11-15 Björn Lindqvist <bjourne@gmail.com>
* src/menu.c: added MetaMenuItemType enum; added it
to MenuItem; added values of this type to menuitems
array.
* src/menu.c (menu_item_new): rewrite to take a MenuItem
instead of a set of parameters describing the menu item.
* src/menu.c (meta_window_menu_new): use proper checkboxes
or radio buttons on the window menu.
* src/window.c (meta_window_show_menu): unstick and stick
are always shown.
2006-10-01 Elijah Newren <newren gmail com>
* src/*.[ch]: Stick an emacs comment directive at the beginning of
all the code files so that people using emacs will be more likely
to get coding style correct in their patches. We still need a
similar vi directive. #358866
2006-09-27 Elijah Newren <newren gmail com>
* src/menu.c (var menuitems): Patch from Bruno Boaventura to add
notes to remind translators to keep translations in sync with
libwnck. #355620.
2006-02-19 Thomas Thurman <thomas thurman org uk>
Removed "move to another workspace" menu when there are
exactly two workspaces. Fixes#151183.
* src/menu.c (meta_window_menu_new): clear
META_MENU_OP_WORKSPACES bit when n_workspaces==2
2005-11-18 Elijah Newren <newren@gmail.com>
Merge of all the changes on the constraints_experiments branch.
This is just a summary, to get the full ChangeLog of those
changes (approx. 2000 lines):
cvs -q -z3 update -Pd -r constraints_experiments
cvs -q -z3 diff -pu -r CONSTRAINTS_EXPERIMENTS_BRANCHPOINT ChangeLog
Bugs fixed:
unfiled - constraints.c is overly complicated[1]
unfiled - constraints.c is not robust when all constraints
cannot simultaneously be met (constraints need to be
prioritized)
unfiled - keep-titlebar-onscreen constraint is decoration
unaware (since get_outermost_onscreen_positions()
forgets to include decorations)
unfiled - keyboard snap-moving and snap-resizing snap to hidden
edges
109553 - gravity w/ simultaneous move & resize doesn't work
113601 - maximize vertical and horizontal should toggle and be
constrained
122196 - windows show up under vertical panels
122670 - jerky/random resizing of window via keyboard[2]
124582 - keyboard and mouse snap-resizing and snap-moving
erroneously moves the window multidimensionally
136307 - don't allow apps to resize themselves off the screen
(*cough* filechooser *cough*)
142016, 143784 - windows should not span multiple xineramas
unless placed there by the user
143145 - clamp new windows to screensize and force them
onscreen, if they'll fit
144126 - Handle pathological strut lists sanely[3]
149867 - fixed aspect ratio windows are difficult to resize[4]
152898 - make screen edges consistent; allow easy slamming of
windows into the left, right, and bottom edges of the
screen too.
154706 - bouncing weirdness at screen edge with keyboard moving
or resizing
156699 - avoid struts when placing windows, if possible (nasty
a11y blocker)
302456 - dragging offscreen too restrictive
304857 - wireframe moving off the top of the screen is misleading
308521 - make uni-directional resizing easier with
alt-middle-drag and prevent the occasional super
annoying resize-the-wrong-side(s) behavior
312007 - snap-resize moves windows with a minimum size
constraint
312104 - resizing the top of a window can cause the bottom to
grow
319351 - don't instantly snap on mouse-move-snapping, remove
braindeadedness of having order of releasing shift and
releasing button press matter so much
[1] fixed in my opinion, anyway.
[2] Actually, it's not totally fixed--it's just annoying
instead of almost completely unusable. Matthias had a
suggestion that may fix the remainder of the problems (see
http://tinyurl.com/bwzuu).
[3] This bug was originally about not-quite-so-pathological
cases but was left open for the worse cases. The code from
the branch handles the remainder of the cases mentioned in
this bug.
[4] Actually, although it's far better there's still some minor
issues left: a slight drift that's only noticeable after
lots of resizing, and potential problems with partially
onscreen constraints due to not clearing any
fixed_directions flags (aspect ratio windows get resized in
both directions and thus aren't fixed in one of them)
New feature:
81704 - edge resistance for user move and resize operations;
in particular 3 different kinds of resistance are
implemented:
Pixel-Distance: window movement is resisted when it
aligns with an edge unless the movement is greater than
a threshold number of pixels
Timeout: window movement past an edge is prevented until
a certain amount of time has elapsed during the
operation since the first request to move it past that
edge
Keyboard-Buildup: when moving or resizing with the
keyboard, once a window is aligned with a certain edge
it cannot move past until the correct direction has
been pressed enough times (e.g. 2 or 3 times)
Major changes:
- constraints.c has been rewritten; very few lines of code from
the old version remain. There is a comment near the top of
the function explaining the basics of how the new framework
works. A more detailed explanation can be found in
doc/how-constraints-works.txt
- edge-resistance.[ch] are new files implementing edge-resistance.
- boxes.[ch] are new files containing low-level error-prone
functions used heavily in constraints.c and edge-resistance.c,
among various places throughout the code. testboxes.c
contains a thorough testsuite for the boxes.[ch] functions
compiled into a program, testboxes.
- meta_window_move_resize_internal() *must* be told the gravity
of the associated operation (if it's just a move operation,
the gravity will be ignored, but for resize and move+resize
the correct value is needed)
- the craziness of different values that
meta_window_move_resize_internal() accepts has been documented
in a large comment at the beginning of the function. It may
be possible to clean this up some, but until then things will
remain as they were before--caller beware.
- screen and xinerama usable areas (i.e. places not covered by
e.g. panels) are cached in the workspace now, as are the
screen and xinerama edges. These get updated with the
workarea in src/workspace.c:ensure_work_areas_validated()
2005-01-31 Elijah Newren <newren@gmail.com>
Try 2 to correct misleading and inaccurate wording. Hopefully,
really fixes#165380.
* src/menu.c: Change wording of menu from "Always on Current
Workspace" to "Always on Visible Workspace". "Always on Current
Workspace" could sound like a synonym of "Only on This Workspace"
when it was supposed to be the opposite.
2005-01-28 Elijah Newren <newren@gmail.com>
* src/menu.c: Change wording of menu to "Always on Current
Workspace" from "Put on All Workspaces", remove a quick-key
conflict between "On _Top" and "Only on _This Workspace" by
switching the latter to "_Only on This Workspace"
* src/window.c: Remove a comment that is no longer necessary
(since bug 87531 has been fixed)
2004-08-07 Rob Adams <readams@readams.net>
Remove some extraneous items that could sometimes appear in the
window menu. Fix for #144493.
* src/menu.c (menuitems): Change the second separator to key on
whether there are any workspaces.
(meta_window_menu_new): use NULL label instead of 0 op to identify
separator
* src/window.c (meta_window_show_menu): Change the conditions on
the directions to take into account "holes" in the workspace
layout and also only set META_MENU_OP_WORKSPACES when there's more
than one workspace.
2004-06-21 Anders Carlsson <andersca@gnome.org>
* src/common.h:
* src/menu.c: (menu_closed), (activate_cb):
* src/window.c: (menu_callback):
Add a timestamp argument to menu functions and
use it in meta_window_delete.
2004-02-23 Rob Adams <readams@readams.net>
Add my copyright notice to a number of files on which it should
already exist.
* src/window.c (meta_window_notify_focus): modify code to move to
front of MRU list so that we can have an assert that it was there
in the first place. This code may be causing some crashes. See
#131196.
2003-12-20 Rob Adams <readams@readams.net>
Reorganize the window menu according to discussion on #110904.
The workspace name mnemonic chunk of the patch is thanks to
Jonathan Blandford.
* src/common.h: add MENU_OP_ABOVE, MENU_OP_UNABOVE, MENU_UP_MOVE_TO_*
menu ops.
* src/core.c (meta_core_get_menu_accelerator): add accelerator for
the new menu ops.
* src/menu.c: add checked attribute in _MenuItem struct to display
a checkmark next to a menu item. Add the new menu items to
menuitems.
(get_workspace_name_with_accel): Add mnemonics even to renamed
workspaces.
(menu_item_new): provide support for the checked attribute
(meta_window_menu_new): construct new submenu for workspace
switching.
* src/window.c (menu_callback): implement support for the new menu
ops.
(meta_window_show_menu): don't use the OP_*SHAPE operations, and
compute which of the OP_MOVE_TO_* ops should be used for the
current workspace and workspace layout. Add the OP_*ABOVE
operations.
2003-10-30 Havoc Pennington <hp@redhat.com>
* src/menu.c (meta_window_menu_new): patch to avoid creating
stick/unstick menu items when only one workspace, bug #116563
from Michael Terry
2003-01-29 Havoc Pennington <hp@pobox.com>
* src/menu.c (meta_window_menu_new): don't create workspaces
menu items if only 1 workspace. Fix for #101952 from
Orien Vandenbergh
2002-11-19 Havoc Pennington <hp@pobox.com>
Should really fix#98303
* src/prefs.c (meta_prefs_change_workspace_name): add
bad hack to treat empty string the same as null
* src/menu.c (get_workspace_name_with_accel): allocate one more
than the length of "name" so we have room for a nul byte (and
don't malloc(0) on empty strings). Also some formatting cleanups.
2002-11-19 Havoc Pennington <hp@pobox.com>
Fix#98303 and assorted cleanup
* src/prefs.c (meta_preference_to_string): handle
META_PREF_WORKSPACE_NAMES
* src/menu.c (get_workspace_name_with_accel): assert that the
workspace has a name
* src/screen.c (meta_screen_ensure_workspace_popup): assert that
we got a workspace name
(meta_screen_ensure_workspace_popup): assert that we got a
workspace name
* src/prefs.c (update_workspace_name): fix screwiness (strcmp with
a freed string, assorted bad logic)
(init_workspace_names): assert that we filled in a default
workspace name
(meta_prefs_get_workspace_name): assert non-NULL workspace name
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_get_name): new function,
and remove workspace->name field, instead just get the
name from prefs each time
* src/screen.c (meta_screen_update_workspace_names): update the
gconf key to persist workspace names here, instead of changing
the names we use
* src/util.c (topic_name): add META_DEBUG_PREFS
* src/prefs.c: change NUM_COMMANDS to 32 to allow more custom
commands, implement workspace names
* src/metacity.schemas.in: add workspace_names/name_NN gconf keys.
2002-10-16 Havoc Pennington <hp@redhat.com>
* src/workspace.c: workspaces are all per-screen now, fix
accordingly
* src/core.c: fix multihead workspace stuff
* src/keybindings.c: multihead-rama
* src/screen.c (meta_screen_show_desktop): new functions to
replace display equivalents
* src/display.c (meta_display_get_workspace_by_screen_index): get
rid of this
(meta_display_get_workspace_by_index): get rid of this
(event_callback): handle _NET_SHOWING_DESKTOP message per-screen
* src/screen.c (meta_screen_get_workspace_by_index): new function
* src/screen.h (struct _MetaScreen): move workspace list, and
showing_desktop flag, to be per-screen
* src/window.c (window_query_root_pointer): return whether pointer
is on window's screen
(meta_window_handle_mouse_grab_op_event): don't use coordinates
from other screens when updating a window operation on the current
screen. I can't believe no one has reported this...
2002-09-26 Havoc Pennington <hp@pobox.com>
* src/menu.c (meta_window_menu_new): use MetaAccelLabel to display
accelerators for the menu items
* src/metaaccellabel.c: cut-and-paste GtkAccelLabel and port to
use virtual modifiers
* src/Makefile.am (metacity_SOURCES): add metaaccellabel.[hc]
* src/prefs.c (meta_prefs_get_window_binding): new function
* src/core.c (meta_core_get_menu_accelerator): new function
2002-09-24 Havoc Pennington <hp@redhat.com>
* src/main.c (main): support --version, #92796 patch from
Christian Neumair
* autogen.sh: change gettext test to be happy with
glib-gettextize, #81425
* src/menu.c: change mnemonics to match bug #78999
* src/theme.c (meta_theme_validate): consolidate some
nearly-identical themes for ease of translation, #70962
2002-08-10 Havoc Pennington <hp@pobox.com>
* src/menu.c: reorder the menu items so that Close is at the
bottom
* src/theme-viewer.c (main): set debugging mode if METACITY_DEBUG
enabled
2002-08-10 Jorn Baayen <jorn@nl.linux.org>
Register window menu icons with the Gtk stock system, instead
of using the ones from the Metacity theme (which looked very bad with
some themes).
* src/Makefile.am:
* src/main.c:
* src/menu.c:
* src/stock_delete.png: added these files
* src/stock_minimize.png:
* src/stock_maximize.png:
* src/ui.c
2002-07-24 Havoc Pennington <hp@redhat.com>
* src/theme-parser.c (meta_theme_load): look for themes in
~/.themes/NAME/metacity-1/ and datadir/themes/NAME/metacity-1
instead of the old locations.
* src/themes/Makefile.am: install themes to
datadir/themes/NAME/metacity-1/ to match how GTK works, breaking
third-party themes yet again! woot!
2002-05-26 Havoc Pennington <hp@pobox.com>
Patch from Gaute Lindkvist so you can't move the panel or desktop
to only one workspace.
* src/keybindings.c (handle_move_to_workspace): don't allow moving
window to another space if the window is always_sticky
* src/window.c (recalc_window_features): set the always_sticky
field for desktop/dock windows.
(meta_window_show_menu): disable unsticking always sticky windows
via the menus
* src/menu.c (meta_window_menu_new): disable workspace items
if requested
Tue Apr 30 06:24:09 2002 Jonathan Blandford <jrb@gnome.org>
* src/menu.c: give Maximize/Unmaximize and Shade/Unshade the same
mnemonic for consistency's sake.
2002-03-06 Havoc Pennington <hp@pobox.com>
* src/core.c (meta_core_get_grab_frame): add some assertions
* src/menu.c (meta_window_menu_new): make another warning
into a verbose
* src/display.c (meta_change_button_grab): use verbose rather than
warning to log failures to grab button, since these are typically
BadWindow from a destroyed window.
2002-02-06 Havoc Pennington <hp@pobox.com>
* src/main.c (main): disable custom log handler and fatal mask for
now
* src/theme.c (meta_draw_op_list_draw):
Add META_DRAW_CLIP
* src/main.c: load theme, monitor current theme setting
* src/prefs.c: add "current theme" setting
* src/stack.c (meta_stack_free): don't try to free
last_root_children_stacked if it doesn't exist
* src/themewidget.c: pluggable GtkMisc subclass to use
for menu icons
* src/screen.c (meta_screen_manage_all_windows): fix
signed/unsigned warning
* src/frames.c: port to theme system
(meta_frames_style_set): chain up
* theme-format.txt: new file
* configure.in: add more compiler warnings
* src/theme.c: add various stuff needed to get theme parser
working. Remove the "spacer" concept from FrameLayout object.
Add draw op that references a draw op list.
* configure.in: require GTK 1.3.13
* src/Makefile.am: add theme-parser.[hc], implement loading a
theme
* src/theme.c: add "draw title" and "draw window icon" operations
(meta_draw_op_draw): put object_width/object_height in expression
environment before computing x/y. Handle out-of-memory when
creating pixbufs. Assorted other cleanups.
2001-12-09 Havoc Pennington <hp@pobox.com>
* src/main.c (main): move SM init a bit later in the process, and
init prefs
* src/session.c: fix no SM case (though I hardly know why I'm
bothering)
* src/main.c (main): call bindtextdomain
* src/util.h (_): actually call gettext
* configure.in: put in AM_GLIB_GNU_GETTEXT and gconf stuff
* src/prefs.c: Preferences - this marks the beginning of our doom.
None of them are actually implemented yet, but we monitor
some stuff from gconf.
2001-10-07 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_client_message): don't allow
shade/maximize/minimize for windows that don't support those
operations. (minimizing the panel = bad)