Compare commits
7 Commits
METACITY_2
...
METACITY_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4b0fd1b7d8 | ||
![]() |
3789229a70 | ||
![]() |
14c046d18d | ||
![]() |
386ffb4752 | ||
![]() |
fa51a94a69 | ||
![]() |
ef3f8c18a1 | ||
![]() |
f4e327f69c |
31
ChangeLog
31
ChangeLog
@@ -1,3 +1,34 @@
|
||||
2007-11-17 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* NEWS: 2.21.2 release.
|
||||
|
||||
2007-11-17 Benjamin Gramlich <benjamin.gramlich@gmail.com>
|
||||
|
||||
* src/theme-parser.c (meta_theme_load): make our theme
|
||||
search compliant to the XDG Base Directory Specification.
|
||||
Closes #480026.
|
||||
|
||||
2007-11-15 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* src/api.[ch]: remove almost-unused files.
|
||||
* src/colors.[ch]: move the used parts of api.[ch] in here.
|
||||
Closes #496947.
|
||||
|
||||
2007-11-13 Peter Bloomfield <pbloomfield@bellsouth.net>
|
||||
|
||||
* src/window.c: (meta_window_save_user_rect): new helper, saves
|
||||
only unmaximized dimensions, and not when fullscreen.
|
||||
(meta_window_move_resize_internal,
|
||||
meta_window_move_resize_request): use it. (#461927)
|
||||
|
||||
2007-11-11 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* configure.in: Post-release bump to 2.21.2.
|
||||
|
||||
2007-11-11 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* NEWS: 2.21.1 release.
|
||||
|
||||
2007-11-11 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* src/window.c (meta_window_show): adjust expression which decides
|
||||
|
16
NEWS
16
NEWS
@@ -1,3 +1,19 @@
|
||||
2.21.2
|
||||
======
|
||||
|
||||
Thanks to Benjamin Gramlich, Thomas Thurman, and Peter Bloomfield
|
||||
for improvements in this release.
|
||||
|
||||
- Theme parser is compliant to XDG Base Directory Specification
|
||||
in searching for theme files. (Benjamin) (#480026)
|
||||
- Some source files which didn't get used were removed (Thomas)
|
||||
(#496947)
|
||||
- Fullscreen and maximise windows don't try to save their position
|
||||
(Peter) (#461927)
|
||||
|
||||
Translations
|
||||
Matej Urbančič (sl)
|
||||
|
||||
2.21.1
|
||||
======
|
||||
|
||||
|
@@ -4,7 +4,7 @@ m4_define([metacity_major_version], [2])
|
||||
m4_define([metacity_minor_version], [21])
|
||||
# Fibonacci sequence for micro version numbering:
|
||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||
m4_define([metacity_micro_version], [1])
|
||||
m4_define([metacity_micro_version], [2])
|
||||
|
||||
m4_define([metacity_version],
|
||||
[metacity_major_version.metacity_minor_version.metacity_micro_version])
|
||||
|
@@ -1,3 +1,7 @@
|
||||
2007-11-12 Matej Urbančič <mateju@svn.gnome.org>
|
||||
|
||||
* sl.po: Updated Slovenian translation.
|
||||
|
||||
2007-11-08 Daniel Nylander <po@danielnylander.se>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
9
po/sl.po
9
po/sl.po
@@ -1,4 +1,3 @@
|
||||
# Copyright (C) 2002-2006 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the metacity package.
|
||||
#
|
||||
# Andraz Tori <andraz.tori1@guest.arnes.si>, 2000.
|
||||
@@ -10,7 +9,7 @@ msgstr ""
|
||||
"Project-Id-Version: metacity\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-10-03 03:39+0100\n"
|
||||
"PO-Revision-Date: 2007-10-25 15:03+0100\n"
|
||||
"PO-Revision-Date: 2007-11-13 14:53+0100\n"
|
||||
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
|
||||
"Language-Team: Slovenian <sl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -114,7 +113,7 @@ msgstr "Menu oken"
|
||||
# G:0 K:1 O:0
|
||||
#: ../src/frames.c:1084
|
||||
msgid "Minimize Window"
|
||||
msgstr "Pomanjšaj okno"
|
||||
msgstr "Skrči okno"
|
||||
|
||||
#: ../src/frames.c:1087
|
||||
msgid "Maximize Window"
|
||||
@@ -1570,7 +1569,7 @@ msgstr "ime <%s> \"%s\" je uporabljeno drugič"
|
||||
#: ../src/theme-parser.c:1158
|
||||
#, c-format
|
||||
msgid "<%s> parent \"%s\" has not been defined"
|
||||
msgstr "starš <%s> \"%s\" ni bil naveden"
|
||||
msgstr "nadrejeni predmet <%s> \"%s\" ni bil naveden"
|
||||
|
||||
#: ../src/theme-parser.c:1060
|
||||
#, c-format
|
||||
@@ -1580,7 +1579,7 @@ msgstr "geometrija <%s> \"%s\" ni bila navedena"
|
||||
#: ../src/theme-parser.c:1073
|
||||
#, c-format
|
||||
msgid "<%s> must specify either a geometry or a parent that has a geometry"
|
||||
msgstr "<%s> mora navesti ali geometrijo ali starša, ki ima geometrijo"
|
||||
msgstr "<%s> mora navesti ali geometrijo ali nadrejeni predmet, ki ima geometrijo"
|
||||
|
||||
#: ../src/theme-parser.c:1115
|
||||
msgid "You must specify a background for an alpha value to be meaningful"
|
||||
|
55
src/api.c
55
src/api.c
@@ -1,55 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity misc. public entry points */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "api.h"
|
||||
#include "display.h"
|
||||
#include "colors.h"
|
||||
|
||||
PangoContext*
|
||||
meta_get_pango_context (Screen *xscreen,
|
||||
const PangoFontDescription *desc)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
screen = meta_screen_for_x_screen (xscreen);
|
||||
|
||||
g_return_val_if_fail (screen != NULL, NULL);
|
||||
|
||||
return meta_screen_get_pango_context (screen,
|
||||
desc,
|
||||
/* FIXME, from the frame window */
|
||||
PANGO_DIRECTION_LTR);
|
||||
}
|
||||
|
||||
gulong
|
||||
meta_get_x_pixel (Screen *xscreen, const PangoColor *color)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
screen = meta_screen_for_x_screen (xscreen);
|
||||
|
||||
g_return_val_if_fail (screen != NULL, 0);
|
||||
|
||||
return meta_screen_get_x_pixel (screen, color);
|
||||
}
|
||||
|
64
src/api.h
64
src/api.h
@@ -1,64 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity misc. public entry points */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_API_H
|
||||
#define META_API_H
|
||||
|
||||
/* don't add any internal headers here; api.h is an installed/public
|
||||
* header. Only theme.h is also installed.
|
||||
*/
|
||||
#include <X11/Xlib.h>
|
||||
#include <pango/pangox.h>
|
||||
|
||||
/* Colors/state stuff matches GTK since we get the info from
|
||||
* the GTK UI slave
|
||||
*/
|
||||
typedef struct _MetaUIColors MetaUIColors;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_STATE_NORMAL,
|
||||
META_STATE_ACTIVE,
|
||||
META_STATE_PRELIGHT,
|
||||
META_STATE_SELECTED,
|
||||
META_STATE_INSENSITIVE
|
||||
} MetaUIState;
|
||||
|
||||
struct _MetaUIColors
|
||||
{
|
||||
PangoColor fg[5];
|
||||
PangoColor bg[5];
|
||||
PangoColor light[5];
|
||||
PangoColor dark[5];
|
||||
PangoColor mid[5];
|
||||
PangoColor text[5];
|
||||
PangoColor base[5];
|
||||
PangoColor text_aa[5];
|
||||
};
|
||||
|
||||
PangoContext* meta_get_pango_context (Screen *xscreen,
|
||||
const PangoFontDescription *desc);
|
||||
gulong meta_get_x_pixel (Screen *xscreen,
|
||||
const PangoColor *color);
|
||||
|
||||
#endif
|
11
src/colors.c
11
src/colors.c
@@ -23,6 +23,17 @@
|
||||
|
||||
#include "colors.h"
|
||||
|
||||
struct _MetaUIColors
|
||||
{
|
||||
PangoColor fg[5];
|
||||
PangoColor bg[5];
|
||||
PangoColor light[5];
|
||||
PangoColor dark[5];
|
||||
PangoColor mid[5];
|
||||
PangoColor text[5];
|
||||
PangoColor base[5];
|
||||
PangoColor text_aa[5];
|
||||
};
|
||||
|
||||
static void
|
||||
visual_decompose_mask (gulong mask,
|
||||
|
@@ -24,13 +24,17 @@
|
||||
#ifndef META_COLORS_H
|
||||
#define META_COLORS_H
|
||||
|
||||
/* Colors/state stuff matches GTK.
|
||||
*/
|
||||
typedef struct _MetaUIColors MetaUIColors;
|
||||
|
||||
/* This stuff will all just be XlibRGB eventually. Right now
|
||||
* it has a stub implementation.
|
||||
*/
|
||||
|
||||
#include "screen.h"
|
||||
#include "util.h"
|
||||
#include "api.h"
|
||||
|
||||
gulong meta_screen_get_x_pixel (MetaScreen *screen,
|
||||
const PangoColor *color);
|
||||
void meta_screen_init_visual_info (MetaScreen *screen);
|
||||
|
@@ -4466,6 +4466,8 @@ meta_theme_load (const char *theme_name,
|
||||
char *theme_dir;
|
||||
MetaTheme *retval;
|
||||
guint version;
|
||||
const gchar* const* xdg_data_dirs;
|
||||
int i;
|
||||
|
||||
text = NULL;
|
||||
length = 0;
|
||||
@@ -4511,8 +4513,9 @@ meta_theme_load (const char *theme_name,
|
||||
gchar *theme_filename = g_strdup_printf (METACITY_THEME_FILENAME_FORMAT,
|
||||
version);
|
||||
|
||||
/* We try in home dir, then system dir for themes */
|
||||
|
||||
/* We try first in home dir, XDG_DATA_DIRS, then system dir for themes */
|
||||
|
||||
/* Try home dir for themes */
|
||||
theme_dir = g_build_filename (g_get_home_dir (),
|
||||
".themes",
|
||||
theme_name,
|
||||
@@ -4537,6 +4540,43 @@ meta_theme_load (const char *theme_name,
|
||||
theme_file = NULL;
|
||||
}
|
||||
|
||||
/* Try each XDG_DATA_DIRS for theme */
|
||||
xdg_data_dirs = g_get_system_data_dirs();
|
||||
for(i = 0; xdg_data_dirs[i] != NULL; i++)
|
||||
{
|
||||
if (text == NULL)
|
||||
{
|
||||
theme_dir = g_build_filename (xdg_data_dirs[i],
|
||||
"themes",
|
||||
theme_name,
|
||||
THEME_SUBDIR,
|
||||
NULL);
|
||||
|
||||
theme_file = g_build_filename (theme_dir,
|
||||
theme_filename,
|
||||
NULL);
|
||||
|
||||
error = NULL;
|
||||
if (!g_file_get_contents (theme_file,
|
||||
&text,
|
||||
&length,
|
||||
&error))
|
||||
{
|
||||
meta_topic (META_DEBUG_THEMES, "Failed to read theme from file %s: %s\n",
|
||||
theme_file, error->message);
|
||||
g_error_free (error);
|
||||
g_free (theme_dir);
|
||||
g_free (theme_file);
|
||||
theme_file = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Look for themes in METACITY_DATADIR */
|
||||
if (text == NULL)
|
||||
{
|
||||
theme_dir = g_build_filename (METACITY_DATADIR,
|
||||
|
45
src/window.c
45
src/window.c
@@ -75,6 +75,7 @@ static void meta_window_show (MetaWindow *window);
|
||||
static void meta_window_hide (MetaWindow *window);
|
||||
|
||||
static void meta_window_save_rect (MetaWindow *window);
|
||||
static void meta_window_save_user_rect (MetaWindow *window);
|
||||
|
||||
static void meta_window_move_resize_internal (MetaWindow *window,
|
||||
MetaMoveResizeFlags flags,
|
||||
@@ -2431,6 +2432,30 @@ meta_window_save_rect (MetaWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_save_user_rect (MetaWindow *window)
|
||||
{
|
||||
/* We do not save maximized or fullscreen dimensions, otherwise the
|
||||
* window may snap back to those dimensions (Bug #461927). */
|
||||
if (!(META_WINDOW_MAXIMIZED (window) || window->fullscreen))
|
||||
{
|
||||
MetaRectangle user_rect;
|
||||
|
||||
meta_window_get_client_root_coords (window, &user_rect);
|
||||
|
||||
if (!window->maximized_horizontally)
|
||||
{
|
||||
window->user_rect.x = user_rect.x;
|
||||
window->user_rect.width = user_rect.width;
|
||||
}
|
||||
if (!window->maximized_vertically)
|
||||
{
|
||||
window->user_rect.y = user_rect.y;
|
||||
window->user_rect.height = user_rect.height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_maximize_internal (MetaWindow *window,
|
||||
MetaMaximizeFlags directions,
|
||||
@@ -3506,23 +3531,7 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
* placement of the window.
|
||||
*/
|
||||
if (is_user_action || !window->placed)
|
||||
{
|
||||
MetaRectangle user_rect;
|
||||
|
||||
meta_window_get_client_root_coords (window, &user_rect);
|
||||
|
||||
if (!window->maximized_horizontally)
|
||||
{
|
||||
window->user_rect.x = user_rect.x;
|
||||
window->user_rect.width = user_rect.width;
|
||||
}
|
||||
|
||||
if (!window->maximized_vertically)
|
||||
{
|
||||
window->user_rect.y = user_rect.y;
|
||||
window->user_rect.height = user_rect.height;
|
||||
}
|
||||
}
|
||||
meta_window_save_user_rect(window);
|
||||
|
||||
if (need_move_frame || need_resize_frame ||
|
||||
need_move_client || need_resize_client)
|
||||
@@ -4566,7 +4575,7 @@ meta_window_move_resize_request (MetaWindow *window,
|
||||
*
|
||||
* See also bug 426519.
|
||||
*/
|
||||
meta_window_get_client_root_coords (window, &window->user_rect);
|
||||
meta_window_save_user_rect(window);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
Reference in New Issue
Block a user