Compare commits

...

37 Commits

Author SHA1 Message Date
Matthias Clasen
6312dba24b 3.6.2 2012-11-10 14:07:22 -05:00
Benjamin Otte
edac0e6c40 tests: Add an intersection test for the recent bug
Just using the hardcoded bitmasks triggered the bug fixed in commit
e8f2eeac92 - so just do that as the test.
2012-11-10 18:58:53 +01:00
Benjamin Otte
c6c92aa71b tests: Add some bitmasks to the hardcoded list
The bitmasks with the 31st, 32nd and 63rd bit set are added. The make up
the largest bitmasks on 32bit/64bit that can be represented without
allocating and the smallest bitmask on 32bit that must be allocated.
2012-11-10 18:58:53 +01:00
Benjamin Otte
919ab92ac1 bitmask: Fix intersection code
With the fix in 77912a65e2, another bug
got visible: booleans are 32 bits, so if the intersection between the 2
bitmasks happened in higher bits, the return value would be truncated to
FALSE.

This actually made slider handles disappear, so it was pretty visible.
2012-11-10 18:58:53 +01:00
Alexander Larsson
4504a7a626 Make _gtk_css_lookup_get_missing inline
This is called a lot in the loop in gtk_css_style_provider_lookup which
actually showed up on profiles.
(cherry picked from commit e60c9219f1)
2012-11-09 17:07:37 +01:00
Alexander Larsson
3c76649503 gtk_css_style_provider_lookup: minor loop optimiziation
This is a minor performance improvement but this loop
is run a lot so it actually matters in large state
changes.
(cherry picked from commit 1c4158a649)
2012-11-09 17:07:31 +01:00
Alexander Larsson
1bbb7555f0 Exit early in gtk_style_context_update_cache codepaths
If lookup->missing is empty we don't need to continue looking.
We short circuit in several places as this can happen
after iteratively makeign lookup->missing smaller.
(cherry picked from commit 55d65571f3)

Conflicts:
	gtk/gtkstylecontext.c
2012-11-09 17:07:17 +01:00
Alexander Larsson
a4374fdcbc Fix cnp bug in _gtk_bitmask_intersects
We need to use the allocated codepath if *any* argument is
allocated, not if one arg is not allocated.
This bug caused unnecessary calls to _gtk_bitmask_is_allocated,
as well as return completely wrong result if both bitmask are
allocated.
(cherry picked from commit 77912a65e2)
2012-11-09 10:20:09 +01:00
Cosimo Cecchi
7349549cdf text-cell-accessible: fix a double unref
We're unreffing the GtkCellRenderer object twice, causing the
application to crash when trying to access the renderer later.

https://bugzilla.gnome.org/show_bug.cgi?id=687872
2012-11-07 15:48:22 -05:00
Cheng-Chia Tseng
b92c802621 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-11-07 02:42:49 +08:00
Benjamin Otte
828fcdac2c gradient: Add color stops to the right gradient
This was causing an infinite loop happily eating up memory.

https://bugzilla.gnome.org/show_bug.cgi?id=687467
2012-11-06 20:52:08 +01:00
Benjamin Otte
dd1460b707 tests: Include config.h 2012-11-06 20:51:15 +01:00
Benjamin Otte
a72782b29a Disable deprecation checks for all libraries we depend on on stable branches.
This is so newer versions of those libraries don't cause more warnings
with a stable GTK version.
We don't ever want to turn off deprecation warnings for master however,
because that's where we get rid of deprecated API we use.

Note that only glib allows use to easily do this, so nothing is done for
Pango, gdk-pixbuf or Cairo here.
2012-11-06 20:50:09 +01:00
Benjamin Otte
8a0f5159a1 cssimage: Fix huge memleak
When transitioning gradients, we were leaking the gradient structs. Not
good.

https://bugzilla.gnome.org/show_bug.cgi?id=687467
2012-11-06 17:53:20 +01:00
Cosimo Cecchi
d9dd5776e9 css: Fix copy/paste error
Benjamin replaced start with end in a bunch of locations, but not all of
them apparently.
2012-11-06 17:53:20 +01:00
Benjamin Otte
a2f0b74020 csscomputedvalues: Plug a leak 2012-11-06 17:53:20 +01:00
Benjamin Otte
e2078e0309 css: Plug a leak in gradient code 2012-11-06 17:48:42 +01:00
Paolo Borelli
ebd04b8a1d gtkmenubutton: remove weak pointer when needed
We must make sure to remove the weak pointer when disposing the widget
or when resetting the align widget otherwise glib will try to nullify
invalid memory.
2012-11-04 17:13:53 +01:00
Paolo Borelli
44b575443d gtkmenubutton: set menu to NULL in dispose.
Prevent menu to be detached multiple times.
2012-11-04 17:13:35 +01:00
Federico Mena Quintero
fa3d04e556 bgo#687196 - Fix model corruption during file removal
The main problem is that we were emitting the row-deleted signal for the model in the middle
of the process that actually deletes the row from the model (remove the row from the array,
update the model->file_lookup hash table, etc.).  In the model's caller, one of the row-deleted
callbacks was requesting an iter, which caused the model to revalidate itself - but it did
this while it was in an inconsistent state.  This led to an assertion failure later when the
model resorted itself.

The fix in remove_file() is like this:

* The filteredness/visibility of the deleted node is not updated.  The
  node will simply be gone; we don't need to update those values at
  all.

* We invalidate just the node that is being deleted.

* The model->file_lookup hash table is not completely nuked; instead,
  we carefully adjust its indices.

* The row-deleted signal is only emitted at the very end, when
  deletion is complete and the model is consistent.

Many thanks to William Hua for doing the detective work on this bug!

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-02 14:17:32 -06:00
Federico Mena Quintero
794584b13c Make freeze_updates() and thaw_updates() static functions
They were in the semi-public API of GtkFileSystemModel, but never actually used outside of it.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-02 14:17:26 -06:00
Federico Mena Quintero
e1c51092df Comments on how the filtering and sorting processes work
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-02 14:17:18 -06:00
Federico Mena Quintero
a3e247cdbb Remove argument to _gtk_file_system_model_update_file() that should not be part of the internal API
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-02 14:17:09 -06:00
Federico Mena Quintero
5f209cd4c1 Rename gtk_tree_path_new_from_node() to tree_path_new_from_node()
This is a function internal to the file system model; let's not pollute the gtk_tree_path namespace.

Also, make the 'i' variable into 'r' as it refers to a row index, not a file-array index (for
consistency with the docs and the rest of the code).

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-02 14:17:00 -06:00
Seán de Búrca
605ad379c9 Updated Irish translation 2012-11-02 03:21:35 -06:00
Benjamin Otte
73c64b4b67 sizegroup: Always at least use widget's size
When widgets were hidden, they were otherwise assigned a 0 size.

https://bugzilla.gnome.org/show_bug.cgi?id=677609
2012-11-01 20:53:55 +01:00
Benjamin Otte
ba247df40c settings: Reset all styles when the enable-animations settings changes
https://bugzilla.gnome.org/show_bug.cgi?id=686021
2012-11-01 12:28:33 +01:00
Benjamin Otte
9bb4be9586 Raleigh: Fix spinners with disabled animations
When animations are disabled, active and inactive spinners should look
different.

https://bugzilla.gnome.org/show_bug.cgi?id=686021
2012-11-01 12:28:05 +01:00
Murray Cumming
51484b1223 iconhelper: Treat the empty string as a NULL stock-id 2012-10-29 07:10:08 +01:00
Carlos Garnacho
6d8b6bd1bb texthandles: set input shape on handles' window
This improves both interaction and theming, as it allows
arbitrary handle shapes while just being draggable from
the visible areas.

This way themes can set up handles with the hotspot visually
displaced from the horizontal center, as long as the hotspot
lies centered in the image/svg asset.
2012-10-26 19:01:37 +02:00
Carlos Garnacho
923bd15a53 texthandle: Fix shape setup on non-composited environments
The check on the handle to be drawn on the mask was based on the yet to
be set priv->windows pointers, pass explicitly the handle position to
have the shape correctly initialized on non-composited environments
2012-10-26 19:01:27 +02:00
John Ralls
09be79aaae Fix typo from f2ab3af 2012-10-25 11:03:17 -07:00
Cosimo Cecchi
9b748d864e scrollbar: remove unused variable
My bad.
2012-10-22 18:43:15 -04:00
Cosimo Cecchi
ff4a4b2c9c scale: update style properties on GtkRange at init
Same fix as in ef027c93d4, but for
the GtkScale subclass of GtkRange.

https://bugzilla.gnome.org/show_bug.cgi?id=686280
2012-10-22 13:14:43 -04:00
Cosimo Cecchi
1639960a86 scrollbar: update style properties on GtkRange at init
GtkScrollbar used to rely on style-updated being emitted every time
after the widget was created in order to set the right values from its
style properties on GtkRange.
Nowadays we try to be smarter and avoid emitting style-updated at
creation time, so we need to manually initialize the GtkRange values.

This fixes a regression from 35e36b9fe5.

https://bugzilla.gnome.org/show_bug.cgi?id=686280
2012-10-22 11:49:13 -04:00
Matthias Clasen
df726fde83 Fix duplicate columns in filechooser entry completion
This partically reverts commit
331bba1ad6, which broke documented
behaviour.
2012-10-17 21:28:10 -04:00
Cosimo Cecchi
cf3913b089 scrolledwindow: set GDK_EXPOSURE_MASK on the overshoot window
Currently we use gtk_style_context_set_background() when the state flags
change in order to propagate the background color to the overshoot
window, but this is actually only needed because the window doesn't get
expose events, since we always draw a full background in draw().
This also fixes some problems when the GdkWindow of the scrolled
window's child is composited, as seen in oxygen-gtk3.

https://bugzilla.gnome.org/show_bug.cgi?id=686265
2012-10-17 09:57:54 -04:00
31 changed files with 2426 additions and 1565 deletions

17
NEWS
View File

@@ -1,3 +1,20 @@
Overview of Changes in GTK+ 3.6.2
=================================
* Bug fixes:
677609 GtkSizeGroup regression in GTK+ 3.3.20
686021 spinner animation should not be subject to...
686265 scrolledwindow: set GDK_EXPOSURE_MASK on t...
686280 GtkScrollbar and GtkScale rendering broken...
687196 filesystemmodel: invalidate nodes on file ...
687467 Commit "Implement proper cross-fades for g...
687872 Segfault when attempting to get character ...
* Translation updates:
Irish
Traditional Chinese
Overview of Changes in GTK+ 3.6.1
=================================

View File

@@ -714,7 +714,6 @@ AM_PATH_GLIB_2_0(glib_required_version, :,
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
gobject gmodule-no-export)
dnl
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
dnl
gtk_save_LIBS=$LIBS
@@ -748,6 +747,19 @@ else
AC_MSG_RESULT([no])
fi
#
# Disable deprecation checks for all libraries we depend on on stable branches.
# This is so newer versions of those libraries don't cause more warnings with
# a stable GTK version.
# We don't ever want to turn off deprecation warnings for master however, because
# that's where we get rid of deprecated API we use.
#
if test m4_eval(gtk_minor_version % 2) = 0 ; then
AC_DEFINE_UNQUOTED(GLIB_DISABLE_DEPRECATION_WARNINGS, 1,
[Disable deprecation warnings from glib])
fi
dnl
saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"

View File

@@ -1439,7 +1439,8 @@ gdk_event_translate (GdkEvent *event,
if (dx != 0.0 || dy != 0.0)
{
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
if (gdk_quartz_osx_version() >= GDK_OSX_LION &[nsevent hasPreciseScrollingDeltas])
if (gdk_quartz_osx_version() >= GDK_OSX_LION &&
[nsevent hasPreciseScrollingDeltas])
{
GdkEvent *emulated_event;

View File

@@ -552,7 +552,6 @@ gtk_text_cell_accessible_get_character_extents (AtkText *text,
gail_renderer = GTK_RENDERER_CELL_ACCESSIBLE (text);
g_object_get (gail_renderer, "renderer", &gtk_renderer, NULL);
g_object_get (gtk_renderer, "text", &renderer_text, NULL);
g_object_unref (gtk_renderer);
if (renderer_text == NULL)
{
g_object_unref (gtk_renderer);

View File

@@ -715,5 +715,17 @@ GtkCalendar.button:hover {
}
.spinner:active {
background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent));
animation: spinner 1s infinite linear;
}

View File

@@ -159,9 +159,9 @@ static inline gboolean
_gtk_bitmask_intersects (const GtkBitmask *mask,
const GtkBitmask *other)
{
if (!_gtk_bitmask_is_allocated (mask) ||
!_gtk_bitmask_is_allocated (other))
if (_gtk_bitmask_is_allocated (mask) ||
_gtk_bitmask_is_allocated (other))
return _gtk_allocated_bitmask_intersects (mask, other);
else
return _gtk_bitmask_to_bits (mask) & _gtk_bitmask_to_bits (other);
return _gtk_bitmask_to_bits (mask) & _gtk_bitmask_to_bits (other) ? TRUE : FALSE;
}

View File

@@ -499,6 +499,8 @@ gtk_css_computed_values_create_css_animations (GtkCssComputedValues *values,
_gtk_css_play_state_value_get (_gtk_css_array_value_get_nth (play_states, i)),
_gtk_css_fill_mode_value_get (_gtk_css_array_value_get_nth (fill_modes, i)),
_gtk_css_number_value_get (_gtk_css_array_value_get_nth (iteration_counts, i), 100));
_gtk_css_keyframes_unref (keyframes);
}
values->animations = g_slist_prepend (values->animations, animation);
}

View File

@@ -79,7 +79,7 @@ fade_pattern (cairo_pattern_t *pattern,
cairo_pattern_add_color_stop_rgba (result, o, r, g, b, a * opacity);
}
return pattern;
return result;
}
static cairo_pattern_t *
@@ -102,7 +102,7 @@ transition_pattern (cairo_pattern_t *start,
{
case CAIRO_PATTERN_TYPE_LINEAR:
cairo_pattern_get_linear_points (start, &sx0, &sy0, &sx1, &sy1);
cairo_pattern_get_linear_points (start, &ex0, &ey0, &ex1, &ey1);
cairo_pattern_get_linear_points (end, &ex0, &ey0, &ex1, &ey1);
result = cairo_pattern_create_linear ((1 - progress) * sx0 + progress * ex0,
(1 - progress) * sx1 + progress * ex1,
(1 - progress) * sy0 + progress * ey0,
@@ -110,7 +110,7 @@ transition_pattern (cairo_pattern_t *start,
break;
case CAIRO_PATTERN_TYPE_RADIAL:
cairo_pattern_get_radial_circles (start, &sx0, &sy0, &sr0, &sx1, &sy1, &sr1);
cairo_pattern_get_radial_circles (start, &ex0, &ey0, &er0, &ex1, &ey1, &er1);
cairo_pattern_get_radial_circles (end, &ex0, &ey0, &er0, &ex1, &ey1, &er1);
result = cairo_pattern_create_radial ((1 - progress) * sx0 + progress * ex0,
(1 - progress) * sy0 + progress * ey0,
(1 - progress) * sr0 + progress * er0,
@@ -128,7 +128,7 @@ transition_pattern (cairo_pattern_t *start,
double so, sr, sg, sb, sa, eo, er, eg, eb, ea;
cairo_pattern_get_color_stop_rgba (start, i, &so, &sr, &sg, &sb, &sa);
cairo_pattern_get_color_stop_rgba (start, i, &eo, &er, &eg, &eb, &ea);
cairo_pattern_get_color_stop_rgba (end, i, &eo, &er, &eg, &eb, &ea);
cairo_pattern_add_color_stop_rgba (result,
(1 - progress) * so + progress * eo,

View File

@@ -24,17 +24,6 @@
#include "gtkcssstylepropertyprivate.h"
#include "gtkstylepropertiesprivate.h"
typedef struct {
GtkCssSection *section;
GtkCssValue *value;
GtkCssValue *computed;
} GtkCssLookupValue;
struct _GtkCssLookup {
GtkBitmask *missing;
GtkCssLookupValue values[1];
};
GtkCssLookup *
_gtk_css_lookup_new (const GtkBitmask *relevant)
{
@@ -65,14 +54,6 @@ _gtk_css_lookup_free (GtkCssLookup *lookup)
g_free (lookup);
}
const GtkBitmask *
_gtk_css_lookup_get_missing (const GtkCssLookup *lookup)
{
g_return_val_if_fail (lookup != NULL, NULL);
return lookup->missing;
}
gboolean
_gtk_css_lookup_is_missing (const GtkCssLookup *lookup,
guint id)

View File

@@ -28,10 +28,21 @@ G_BEGIN_DECLS
typedef struct _GtkCssLookup GtkCssLookup;
typedef struct {
GtkCssSection *section;
GtkCssValue *value;
GtkCssValue *computed;
} GtkCssLookupValue;
struct _GtkCssLookup {
GtkBitmask *missing;
GtkCssLookupValue values[1];
};
GtkCssLookup * _gtk_css_lookup_new (const GtkBitmask *relevant);
void _gtk_css_lookup_free (GtkCssLookup *lookup);
const GtkBitmask * _gtk_css_lookup_get_missing (const GtkCssLookup *lookup);
static inline const GtkBitmask *_gtk_css_lookup_get_missing (const GtkCssLookup *lookup);
gboolean _gtk_css_lookup_is_missing (const GtkCssLookup *lookup,
guint id);
void _gtk_css_lookup_set (GtkCssLookup *lookup,
@@ -47,6 +58,13 @@ void _gtk_css_lookup_resolve (GtkCssLookup
GtkCssComputedValues *values,
GtkCssComputedValues *parent_values);
static inline const GtkBitmask *
_gtk_css_lookup_get_missing (const GtkCssLookup *lookup)
{
return lookup->missing;
}
G_END_DECLS

View File

@@ -1568,18 +1568,19 @@ gtk_css_style_provider_lookup (GtkStyleProviderPrivate *provider,
{
GtkCssProvider *css_provider;
GtkCssProviderPrivate *priv;
int i;
GtkCssRuleset *ruleset;
guint j;
css_provider = GTK_CSS_PROVIDER (provider);
priv = css_provider->priv;
for (i = priv->rulesets->len - 1; i >= 0; i--)
if (priv->rulesets->len == 0)
return;
for (ruleset = &g_array_index (priv->rulesets, GtkCssRuleset, priv->rulesets->len - 1);
ruleset >= &g_array_index (priv->rulesets, GtkCssRuleset, 0);
ruleset--)
{
GtkCssRuleset *ruleset;
ruleset = &g_array_index (priv->rulesets, GtkCssRuleset, i);
if (ruleset->styles == NULL)
continue;
@@ -1603,6 +1604,9 @@ gtk_css_style_provider_lookup (GtkStyleProviderPrivate *provider,
ruleset->styles[j].section,
ruleset->styles[j].value);
}
if (_gtk_bitmask_is_empty (_gtk_css_lookup_get_missing (lookup)))
break;
}
}

View File

@@ -656,8 +656,7 @@ gtk_entry_completion_set_property (GObject *object,
break;
case PROP_TEXT_COLUMN:
gtk_entry_completion_set_text_column (completion,
g_value_get_int (value));
priv->text_column = g_value_get_int (value);
break;
case PROP_INLINE_COMPLETION:

View File

@@ -6798,7 +6798,7 @@ file_system_model_got_thumbnail (GObject *object, GAsyncResult *res, gpointer da
copy_attribute (info, queried, G_FILE_ATTRIBUTE_THUMBNAILING_FAILED);
copy_attribute (info, queried, G_FILE_ATTRIBUTE_STANDARD_ICON);
_gtk_file_system_model_update_file (model, file, info, FALSE);
_gtk_file_system_model_update_file (model, file, info);
g_object_unref (info);

View File

@@ -42,6 +42,9 @@
* the special kind of usage for "search" and "recent-files", where the file chooser gives the model the
* files to be displayed.
*
* Internal data structure
* -----------------------
*
* Each file is kept in a FileModelNode structure. Each FileModelNode holds a GFile* and other data. All the
* node structures have the same size, determined at runtime, depending on the number of columns that were passed
* to _gtk_file_system_model_new() or _gtk_file_system_model_new_for_directory() (that is, the size of a node is
@@ -66,7 +69,14 @@
*
* Each FileModelNode has a node->visible field, which indicates whether the node is visible in the GtkTreeView.
* A node may be invisible if, for example, it corresponds to a hidden file and the file chooser is not showing
* hidden files.
* hidden files. Also, a file filter may be explicitly set onto the model, for example, to only show files that
* match "*.jpg". In this case, node->filtered_out says whether the node failed the filter. The ultimate
* decision on whether a node is visible or not in the treeview is distilled into the node->visible field.
* The reason for having a separate node->filtered_out field is so that the file chooser can query whether
* a (filtered-out) folder should be made sensitive in the GUI.
*
* Visible rows vs. possibly-invisible nodes
* -----------------------------------------
*
* Since not all nodes in the model->files array may be visible, we need a way to map visible row indexes from
* the treeview to array indexes in our array of files. And thus we introduce a bit of terminology:
@@ -95,6 +105,16 @@
*
* You never access a node->row directly. Instead, call node_get_tree_row(). That function will validate the nodes
* up to the sought one if the node is not valid yet, and it will return a proper 0-based row.
*
* Sorting
* -------
*
* The model implements the GtkTreeSortable interface. To avoid re-sorting
* every time a node gets added (which would lead to O(n^2) performance during
* the initial population of the model), the model can freeze itself (with
* freeze_updates()) during the intial population process. When the model is
* frozen, sorting will not happen. The model will sort itself when the freeze
* count goes back to zero, via corresponding calls to thaw_updates().
*/
/*** DEFINES ***/
@@ -184,6 +204,12 @@ struct _GtkFileSystemModelClass
void (*finished_loading) (GtkFileSystemModel *model, GError *error);
};
static void freeze_updates (GtkFileSystemModel *model);
static void thaw_updates (GtkFileSystemModel *model);
static guint node_get_for_file (GtkFileSystemModel *model,
GFile *file);
static void add_file (GtkFileSystemModel *model,
GFile *file,
GFileInfo *info);
@@ -263,13 +289,13 @@ node_invalidate_index (GtkFileSystemModel *model, guint id)
}
static GtkTreePath *
gtk_tree_path_new_from_node (GtkFileSystemModel *model, guint id)
tree_path_new_from_node (GtkFileSystemModel *model, guint id)
{
guint i = node_get_tree_row (model, id);
guint r = node_get_tree_row (model, id);
g_assert (i < model->files->len);
g_assert (r < model->files->len);
return gtk_tree_path_new_from_indices (i, -1);
return gtk_tree_path_new_from_indices (r, -1);
}
static void
@@ -278,7 +304,7 @@ emit_row_inserted_for_node (GtkFileSystemModel *model, guint id)
GtkTreePath *path;
GtkTreeIter iter;
path = gtk_tree_path_new_from_node (model, id);
path = tree_path_new_from_node (model, id);
ITER_INIT_FROM_INDEX (model, &iter, id);
gtk_tree_model_row_inserted (GTK_TREE_MODEL (model), path, &iter);
gtk_tree_path_free (path);
@@ -290,7 +316,7 @@ emit_row_changed_for_node (GtkFileSystemModel *model, guint id)
GtkTreePath *path;
GtkTreeIter iter;
path = gtk_tree_path_new_from_node (model, id);
path = tree_path_new_from_node (model, id);
ITER_INIT_FROM_INDEX (model, &iter, id);
gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, &iter);
gtk_tree_path_free (path);
@@ -570,7 +596,7 @@ gtk_file_system_model_get_path (GtkTreeModel *tree_model,
g_return_val_if_fail (ITER_IS_VALID (model, iter), NULL);
return gtk_tree_path_new_from_node (model, ITER_INDEX (iter));
return tree_path_new_from_node (model, ITER_INDEX (iter));
}
static void
@@ -1097,7 +1123,7 @@ thaw_func (gpointer data)
{
GtkFileSystemModel *model = data;
_gtk_file_system_model_thaw_updates (model);
thaw_updates (model);
model->dir_thaw_source = 0;
return FALSE;
@@ -1119,7 +1145,7 @@ gtk_file_system_model_got_files (GObject *object, GAsyncResult *res, gpointer da
{
if (model->dir_thaw_source == 0)
{
_gtk_file_system_model_freeze_updates (model);
freeze_updates (model);
model->dir_thaw_source = gdk_threads_add_timeout_full (IO_PRIORITY + 1,
50,
thaw_func,
@@ -1168,7 +1194,7 @@ gtk_file_system_model_got_files (GObject *object, GAsyncResult *res, gpointer da
{
g_source_remove (model->dir_thaw_source);
model->dir_thaw_source = 0;
_gtk_file_system_model_thaw_updates (model);
thaw_updates (model);
}
g_signal_emit (model, file_system_model_signals[FINISHED_LOADING], 0, error);
@@ -1189,13 +1215,19 @@ gtk_file_system_model_query_done (GObject * object,
GtkFileSystemModel *model = data; /* only a valid pointer if not cancelled */
GFile *file = G_FILE (object);
GFileInfo *info;
guint id;
info = g_file_query_info_finish (file, res, NULL);
if (info == NULL)
return;
gdk_threads_enter ();
_gtk_file_system_model_update_file (model, file, info, TRUE);
_gtk_file_system_model_update_file (model, file, info);
id = node_get_for_file (model, file);
gtk_file_system_model_sort_node (model, id);
gdk_threads_leave ();
}
@@ -1433,14 +1465,14 @@ gtk_file_system_model_refilter_all (GtkFileSystemModel *model)
return;
}
_gtk_file_system_model_freeze_updates (model);
freeze_updates (model);
/* start at index 1, don't change the editable */
for (i = 1; i < model->files->len; i++)
node_compute_visibility_and_filters (model, i);
model->filter_on_thaw = FALSE;
_gtk_file_system_model_thaw_updates (model);
thaw_updates (model);
}
/**
@@ -1775,6 +1807,33 @@ _gtk_file_system_model_get_iter_for_file (GtkFileSystemModel *model,
return TRUE;
}
/* When an element is added or removed to the model->files array, we need to
* update the model->file_lookup mappings of (node, index), as the indexes
* change. This function adds the specified increment to the index in that pair
* if the index is equal or after the specified id. We use this to slide the
* mappings up or down when a node is added or removed, respectively.
*/
static void
adjust_file_lookup (GtkFileSystemModel *model, guint id, int increment)
{
GHashTableIter iter;
gpointer key;
gpointer value;
g_hash_table_iter_init (&iter, model->file_lookup);
while (g_hash_table_iter_next (&iter, &key, &value))
{
guint index = GPOINTER_TO_UINT (value);
if (index >= id)
{
index += increment;
g_hash_table_iter_replace (&iter, GUINT_TO_POINTER (index));
}
}
}
/**
* add_file:
* @model: the model
@@ -1825,6 +1884,7 @@ remove_file (GtkFileSystemModel *model,
{
FileModelNode *node;
guint id;
guint row;
g_return_if_fail (GTK_IS_FILE_SYSTEM_MODEL (model));
g_return_if_fail (G_IS_FILE (file));
@@ -1834,17 +1894,22 @@ remove_file (GtkFileSystemModel *model,
return;
node = get_node (model, id);
node_set_visible_and_filtered_out (model, id, FALSE, FALSE);
row = node_get_tree_row (model, id);
node_invalidate_index (model, id);
g_hash_table_remove (model->file_lookup, file);
g_object_unref (node->file);
adjust_file_lookup (model, id, -1);
if (node->info)
g_object_unref (node->info);
g_array_remove_index (model->files, id);
g_hash_table_remove_all (model->file_lookup);
/* We don't need to resort, as removing a row doesn't change the sorting order */
/* We don't need to resort, as removing a row doesn't change the sorting order of the other rows */
emit_row_deleted_for_row (model, row);
}
/**
@@ -1852,7 +1917,6 @@ remove_file (GtkFileSystemModel *model,
* @model: the model
* @file: the file
* @info: the new file info
* @requires_resort: FIXME: get rid of this argument
*
* Tells the file system model that the file changed and that the
* new @info should be used for it now. If the file is not part of
@@ -1861,8 +1925,7 @@ remove_file (GtkFileSystemModel *model,
void
_gtk_file_system_model_update_file (GtkFileSystemModel *model,
GFile *file,
GFileInfo *info,
gboolean requires_resort)
GFileInfo *info)
{
FileModelNode *node;
guint i, id;
@@ -1894,9 +1957,6 @@ _gtk_file_system_model_update_file (GtkFileSystemModel *model,
if (node->visible)
emit_row_changed_for_node (model, id);
if (requires_resort)
gtk_file_system_model_sort_node (model, id);
}
/**
@@ -1967,17 +2027,16 @@ _gtk_file_system_model_remove_editable (GtkFileSystemModel *model)
}
/**
* _gtk_file_system_model_freeze_updates:
* freeze_updates:
* @model: a #GtkFileSystemModel
*
* Freezes most updates on the model, so that performing multiple
* operations on the files in the model do not cause any events.
* Use _gtk_file_system_model_thaw_updates() to resume proper
* operations. It is fine to call this function multiple times as
* long as freeze and thaw calls are balanced.
* Freezes most updates on the model, so that performing multiple operations on
* the files in the model do not cause any events. Use thaw_updates() to resume
* proper operations. It is fine to call this function multiple times as long as
* freeze and thaw calls are balanced.
**/
void
_gtk_file_system_model_freeze_updates (GtkFileSystemModel *model)
static void
freeze_updates (GtkFileSystemModel *model)
{
g_return_if_fail (GTK_IS_FILE_SYSTEM_MODEL (model));
@@ -1985,14 +2044,13 @@ _gtk_file_system_model_freeze_updates (GtkFileSystemModel *model)
}
/**
* _gtk_file_system_model_thaw_updates:
* thaw_updates:
* @model: a #GtkFileSystemModel
*
* Undoes the effect of a previous call to
* _gtk_file_system_model_freeze_updates()
* Undoes the effect of a previous call to freeze_updates()
**/
void
_gtk_file_system_model_thaw_updates (GtkFileSystemModel *model)
static void
thaw_updates (GtkFileSystemModel *model)
{
gboolean stuff_added;

View File

@@ -71,8 +71,7 @@ void _gtk_file_system_model_add_and_query_file (GtkFileSystemMode
const char *attributes);
void _gtk_file_system_model_update_file (GtkFileSystemModel *model,
GFile *file,
GFileInfo *info,
gboolean requires_resort);
GFileInfo *info);
void _gtk_file_system_model_set_show_hidden (GtkFileSystemModel *model,
gboolean show_hidden);
@@ -82,8 +81,6 @@ void _gtk_file_system_model_set_show_files (GtkFileSystemModel
gboolean show_files);
void _gtk_file_system_model_set_filter_folders (GtkFileSystemModel *model,
gboolean show_folders);
void _gtk_file_system_model_freeze_updates (GtkFileSystemModel *model);
void _gtk_file_system_model_thaw_updates (GtkFileSystemModel *model);
void _gtk_file_system_model_clear_cache (GtkFileSystemModel *model,
int column);

View File

@@ -327,6 +327,7 @@ _gtk_gradient_resolve_full (GtkGradient *gradient,
{
rgba = *_gtk_css_rgba_value_get_rgba (val);
*dependencies = _gtk_css_dependencies_union (*dependencies, stop_deps);
_gtk_css_value_unref (val);
}
else
{
@@ -467,7 +468,7 @@ gtk_gradient_fade (GtkGradient *gradient,
stop = &g_array_index (gradient->stops, ColorStop, i);
color = gtk_symbolic_color_new_alpha (stop->color, opacity);
gtk_gradient_add_color_stop (gradient, stop->offset, color);
gtk_gradient_add_color_stop (faded, stop->offset, color);
gtk_symbolic_color_unref (color);
}

View File

@@ -20,6 +20,7 @@
#include "config.h"
#include "gtkiconhelperprivate.h"
#include "string.h"
G_DEFINE_TYPE (GtkIconHelper, _gtk_icon_helper, G_TYPE_OBJECT)
@@ -466,7 +467,8 @@ _gtk_icon_helper_set_stock_id (GtkIconHelper *self,
{
_gtk_icon_helper_clear (self);
if (stock_id != NULL)
if (stock_id != NULL &&
g_strcmp0 (stock_id, "") != 0)
{
self->priv->storage_type = GTK_IMAGE_STOCK;
self->priv->stock_id = g_strdup (stock_id);

View File

@@ -806,6 +806,23 @@ gtk_menu_button_get_menu_model (GtkMenuButton *menu_button)
return menu_button->priv->model;
}
static void
set_align_widget_pointer (GtkMenuButton *menu_button,
GtkWidget *align_widget)
{
GtkMenuButtonPrivate *priv;
priv = menu_button->priv;
if (priv->align_widget)
g_object_remove_weak_pointer (G_OBJECT (priv->align_widget), (gpointer *) &priv->align_widget);
priv->align_widget = align_widget;
if (align_widget)
g_object_add_weak_pointer (G_OBJECT (priv->align_widget), (gpointer *) &priv->align_widget);
}
/**
* gtk_menu_button_set_align_widget:
* @menu_button: a #GtkMenuButton
@@ -832,10 +849,7 @@ gtk_menu_button_set_align_widget (GtkMenuButton *menu_button,
if (priv->align_widget == align_widget)
return;
priv->align_widget = align_widget;
if (priv->align_widget)
g_object_add_weak_pointer (G_OBJECT (priv->align_widget), (gpointer *) &priv->align_widget);
set_align_widget_pointer (menu_button, align_widget);
g_object_notify (G_OBJECT (menu_button), "align-widget");
}
@@ -926,8 +940,11 @@ gtk_menu_button_dispose (GObject *object)
menu_deactivate_cb,
object);
gtk_menu_detach (GTK_MENU (priv->popup));
priv->popup = NULL;
}
set_align_widget_pointer (GTK_MENU_BUTTON (object), NULL);
g_clear_object (&priv->model);
G_OBJECT_CLASS (gtk_menu_button_parent_class)->dispose (object);

View File

@@ -221,6 +221,21 @@ gtk_scale_notify (GObject *object,
G_OBJECT_CLASS (gtk_scale_parent_class)->notify (object, pspec);
}
static void
gtk_scale_update_style (GtkScale *scale)
{
gint slider_length;
GtkRange *range;
range = GTK_RANGE (scale);
gtk_widget_style_get (GTK_WIDGET (scale),
"slider-length", &slider_length,
NULL);
gtk_range_set_min_slider_size (range, slider_length);
_gtk_scale_clear_layout (scale);
}
#define add_slider_binding(binding_set, keyval, mask, scroll) \
gtk_binding_entry_add_signal (binding_set, keyval, mask, \
@@ -492,6 +507,7 @@ gtk_scale_init (GtkScale *scale)
context = gtk_widget_get_style_context (GTK_WIDGET (scale));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SCALE);
gtk_scale_update_style (scale);
}
static void
@@ -1020,18 +1036,7 @@ gtk_scale_get_mark_label_size (GtkScale *scale,
static void
gtk_scale_style_updated (GtkWidget *widget)
{
gint slider_length;
GtkRange *range;
range = GTK_RANGE (widget);
gtk_widget_style_get (widget,
"slider-length", &slider_length,
NULL);
gtk_range_set_min_slider_size (range, slider_length);
_gtk_scale_clear_layout (GTK_SCALE (widget));
gtk_scale_update_style (GTK_SCALE (widget));
GTK_WIDGET_CLASS (gtk_scale_parent_class)->style_updated (widget);
}

View File

@@ -115,21 +115,13 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class)
}
static void
gtk_scrollbar_init (GtkScrollbar *scrollbar)
gtk_scrollbar_update_style (GtkScrollbar *scrollbar)
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET (scrollbar));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SCROLLBAR);
}
static void
gtk_scrollbar_style_updated (GtkWidget *widget)
{
GtkRange *range = GTK_RANGE (widget);
gint slider_length;
gboolean fixed_size;
gboolean has_a, has_b, has_c, has_d;
GtkRange *range = GTK_RANGE (scrollbar);
GtkWidget *widget = GTK_WIDGET (scrollbar);
gtk_widget_style_get (widget,
"min-slider-length", &slider_length,
@@ -144,7 +136,22 @@ gtk_scrollbar_style_updated (GtkWidget *widget)
gtk_range_set_slider_size_fixed (range, fixed_size);
_gtk_range_set_steppers (range,
has_a, has_b, has_c, has_d);
}
static void
gtk_scrollbar_init (GtkScrollbar *scrollbar)
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET (scrollbar));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SCROLLBAR);
gtk_scrollbar_update_style (scrollbar);
}
static void
gtk_scrollbar_style_updated (GtkWidget *widget)
{
gtk_scrollbar_update_style (GTK_SCROLLBAR (widget));
GTK_WIDGET_CLASS (gtk_scrollbar_parent_class)->style_updated (widget);
}

View File

@@ -274,9 +274,6 @@ static void gtk_scrolled_window_realize (GtkWidget *wid
static void gtk_scrolled_window_unrealize (GtkWidget *widget);
static void gtk_scrolled_window_map (GtkWidget *widget);
static void gtk_scrolled_window_unmap (GtkWidget *widget);
static void gtk_scrolled_window_state_flags_changed (GtkWidget *widget,
GtkStateFlags previous_state);
static void gtk_scrolled_window_style_updated (GtkWidget *widget);
static void gtk_scrolled_window_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
@@ -352,8 +349,6 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
widget_class->unrealize = gtk_scrolled_window_unrealize;
widget_class->map = gtk_scrolled_window_map;
widget_class->unmap = gtk_scrolled_window_unmap;
widget_class->state_flags_changed = gtk_scrolled_window_state_flags_changed;
widget_class->style_updated = gtk_scrolled_window_style_updated;
widget_class->grab_notify = gtk_scrolled_window_grab_notify;
container_class->add = gtk_scrolled_window_add;
@@ -3379,14 +3374,13 @@ gtk_scrolled_window_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK |
GDK_BUTTON_MOTION_MASK | GDK_TOUCH_MASK;
GDK_BUTTON_MOTION_MASK | GDK_TOUCH_MASK | GDK_EXPOSURE_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
scrolled_window->priv->overshoot_window =
gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (scrolled_window->priv->overshoot_window, widget);
child_widget = gtk_bin_get_child (GTK_BIN (widget));
@@ -3432,37 +3426,6 @@ gtk_scrolled_window_unmap (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->unmap (widget);
}
static void
_gtk_scrolled_window_update_background (GtkScrolledWindow *scrolled_window)
{
GtkWidget *widget = GTK_WIDGET (scrolled_window);
if (gtk_widget_get_realized (widget))
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_background (context, scrolled_window->priv->overshoot_window);
}
}
static void
gtk_scrolled_window_state_flags_changed (GtkWidget *widget,
GtkStateFlags previous_state)
{
_gtk_scrolled_window_update_background (GTK_SCROLLED_WINDOW (widget));
gtk_widget_queue_draw (widget);
}
static void
gtk_scrolled_window_style_updated (GtkWidget *widget)
{
GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->style_updated (widget);
_gtk_scrolled_window_update_background (GTK_SCROLLED_WINDOW (widget));
gtk_widget_queue_draw (widget);
}
static void
gtk_scrolled_window_grab_notify (GtkWidget *widget,
gboolean was_grabbed)

View File

@@ -1848,6 +1848,9 @@ gtk_settings_notify (GObject *object,
if (settings_update_fontconfig (settings))
gtk_style_context_reset_widgets (priv->screen);
break;
case PROP_ENABLE_ANIMATIONS:
gtk_style_context_reset_widgets (priv->screen);
break;
case PROP_CURSOR_THEME_NAME:
case PROP_CURSOR_THEME_SIZE:
settings_update_cursor_theme (settings);

View File

@@ -746,6 +746,11 @@ compute_dimension (GtkWidget *widget,
min_dimension = *minimum;
nat_dimension = *natural;
}
else if (!gtk_widget_get_mapped (tmp_widget) && priv->ignore_hidden)
{
min_dimension = 0;
nat_dimension = 0;
}
else
{
if (mode == GTK_SIZE_GROUP_HORIZONTAL)
@@ -754,11 +759,8 @@ compute_dimension (GtkWidget *widget,
gtk_widget_get_preferred_height (tmp_widget, &min_dimension, &nat_dimension);
}
if (gtk_widget_get_mapped (tmp_widget) || !priv->ignore_hidden)
{
min_result = MAX (min_result, min_dimension);
nat_result = MAX (nat_result, nat_dimension);
}
min_result = MAX (min_result, min_dimension);
nat_result = MAX (nat_result, nat_dimension);
tmp_list = tmp_list->next;
}

View File

@@ -2962,6 +2962,9 @@ gtk_style_context_update_cache (GtkStyleContext *context,
GHashTableIter iter;
gpointer key, value;
if (_gtk_bitmask_is_empty (parent_changes))
return;
priv = context->priv;
g_hash_table_iter_init (&iter, priv->style_data);
@@ -2978,7 +2981,8 @@ gtk_style_context_update_cache (GtkStyleContext *context,
if (_gtk_bitmask_get (changes, GTK_CSS_PROPERTY_FONT_SIZE))
changes = _gtk_bitmask_union (changes, data->store->depends_on_font_size);
build_properties (context, data->store, info, changes);
if (!_gtk_bitmask_is_empty (changes))
build_properties (context, data->store, info, changes);
}
}

View File

@@ -122,49 +122,43 @@ _gtk_text_handle_draw (GtkTextHandle *handle,
}
static void
_gtk_text_handle_update_shape (GtkTextHandle *handle,
GdkWindow *window)
_gtk_text_handle_update_shape (GtkTextHandle *handle,
GdkWindow *window,
GtkTextHandlePosition pos)
{
GtkTextHandlePrivate *priv;
cairo_surface_t *surface;
cairo_region_t *region;
cairo_t *cr;
priv = handle->priv;
surface =
gdk_window_create_similar_surface (window,
CAIRO_CONTENT_COLOR_ALPHA,
gdk_window_get_width (window),
gdk_window_get_height (window));
cr = cairo_create (surface);
_gtk_text_handle_draw (handle, cr, pos);
cairo_destroy (cr);
region = gdk_cairo_region_create_from_surface (surface);
if (gtk_widget_is_composited (priv->parent))
gdk_window_shape_combine_region (window, NULL, 0, 0);
else
{
GtkTextHandlePosition pos;
cairo_surface_t *surface;
cairo_region_t *region;
cairo_t *cr;
gdk_window_shape_combine_region (window, region, 0, 0);
if (window == priv->windows[GTK_TEXT_HANDLE_POSITION_SELECTION_START].window)
pos = GTK_TEXT_HANDLE_POSITION_SELECTION_START;
else if (window == priv->windows[GTK_TEXT_HANDLE_POSITION_SELECTION_END].window)
pos = GTK_TEXT_HANDLE_POSITION_SELECTION_END;
else
return;
gdk_window_input_shape_combine_region (window, region, 0, 0);
surface =
gdk_window_create_similar_surface (window,
CAIRO_CONTENT_COLOR_ALPHA,
gdk_window_get_width (window),
gdk_window_get_height (window));
cr = cairo_create (surface);
_gtk_text_handle_draw (handle, cr, pos);
cairo_destroy (cr);
region = gdk_cairo_region_create_from_surface (surface);
gdk_window_shape_combine_region (window, region, 0, 0);
cairo_surface_destroy (surface);
cairo_region_destroy (region);
}
cairo_surface_destroy (surface);
cairo_region_destroy (region);
}
static GdkWindow *
_gtk_text_handle_create_window (GtkTextHandle *handle)
_gtk_text_handle_create_window (GtkTextHandle *handle,
GtkTextHandlePosition pos)
{
GtkTextHandlePrivate *priv;
GdkRGBA bg = { 0, 0, 0, 0 };
@@ -200,7 +194,7 @@ _gtk_text_handle_create_window (GtkTextHandle *handle)
gdk_window_set_user_data (window, priv->parent);
gdk_window_set_background_rgba (window, &bg);
_gtk_text_handle_update_shape (handle, window);
_gtk_text_handle_update_shape (handle, window, pos);
return window;
}
@@ -307,7 +301,7 @@ _gtk_text_handle_update_window (GtkTextHandle *handle,
gdk_window_destroy (handle_window->window);
/* Create new window and apply old state */
handle_window->window = _gtk_text_handle_create_window (handle);
handle_window->window = _gtk_text_handle_create_window (handle, pos);
if (visible)
{
@@ -531,9 +525,9 @@ _gtk_text_handle_set_relative_to (GtkTextHandle *handle,
{
priv->relative_to = g_object_ref (window);
priv->windows[GTK_TEXT_HANDLE_POSITION_SELECTION_START].window =
_gtk_text_handle_create_window (handle);
_gtk_text_handle_create_window (handle, GTK_TEXT_HANDLE_POSITION_SELECTION_START);
priv->windows[GTK_TEXT_HANDLE_POSITION_SELECTION_END].window =
_gtk_text_handle_create_window (handle);
_gtk_text_handle_create_window (handle, GTK_TEXT_HANDLE_POSITION_SELECTION_END);
priv->realized = TRUE;
}
else
@@ -580,6 +574,10 @@ _gtk_text_handle_set_mode (GtkTextHandle *handle,
}
priv->mode = mode;
_gtk_text_handle_update_shape (handle,
priv->windows[GTK_TEXT_HANDLE_POSITION_CURSOR].window,
GTK_TEXT_HANDLE_POSITION_CURSOR);
}
GtkTextHandleMode

View File

@@ -74,6 +74,9 @@ gtk_bitmask_new_parse (const char *string)
static const char *tests[] = {
"0",
"1",
"1000000000000000000000000000000",
"10000000000000000000000000000000",
"100000000000000000000000000000000000000000000000000000000000000",
"1000000000000000000000000000000000000000000000000000000000000000",
"10000000000000000000000000000000000000000000000000000000000000000",
"1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010",
@@ -234,6 +237,49 @@ test_intersect (void)
}
}
static void
test_intersect_hardcoded (void)
{
GtkBitmask *left, *right, *intersection, *expected;
const char *left_str, *right_str;
guint left_len, right_len;
guint i, l, r;
for (l = 0; l < G_N_ELEMENTS (tests); l++)
{
for (r = 0; r < G_N_ELEMENTS (tests); r++)
{
left = masks[l];
right = masks[r];
left_str = tests[l];
right_str = tests[r];
left_len = strlen (tests[l]);
right_len = strlen (tests[r]);
expected = _gtk_bitmask_new ();
if (left_len > right_len)
left_str += left_len - right_len;
if (right_len > left_len)
right_str += right_len - left_len;
i = MIN (right_len, left_len);
while (i--)
{
expected = _gtk_bitmask_set (expected, i, left_str[0] == '1' && right_str[0] == '1');
right_str++;
left_str++;
}
intersection = _gtk_bitmask_intersect (_gtk_bitmask_copy (left), right);
assert_cmpmasks (intersection, expected);
g_assert_cmpint (_gtk_bitmask_is_empty (expected), ==, !_gtk_bitmask_intersects (left, right));
_gtk_bitmask_free (intersection);
_gtk_bitmask_free (expected);
}
}
}
#define SWAP(_a, _b) G_STMT_START{ \
guint _tmp = _a; \
_a = _b; \
@@ -328,6 +374,7 @@ main (int argc, char *argv[])
g_test_add_func ("/bitmask/set", test_set);
g_test_add_func ("/bitmask/union", test_union);
g_test_add_func ("/bitmask/intersect", test_intersect);
g_test_add_func ("/bitmask/intersect_hardcoded", test_intersect_hardcoded);
g_test_add_func ("/bitmask/invert_range", test_invert_range);
result = g_test_run ();

2993
po/ga.po

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+ 3.3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-05 20:10+0800\n"
"PO-Revision-Date: 2012-09-05 20:10+0800\n"
"Last-Translator: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>\n"
"POT-Creation-Date: 2012-11-07 02:40+0800\n"
"PO-Revision-Date: 2012-11-07 02:40+0800\n"
"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
"Language-Team: Chinese (Hong Kong) <community@linuxhall.org>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
@@ -69,7 +69,7 @@ msgstr "準備設定的 GDK 偵錯旗標"
#. Placeholder in --gdk-no-debug=FLAGS in --help output
#. Placeholder in --gtk-debug=FLAGS in --help output
#. Placeholder in --gtk-no-debug=FLAGS in --help output
#: ../gdk/gdk.c:214 ../gdk/gdk.c:217 ../gtk/gtkmain.c:453 ../gtk/gtkmain.c:456
#: ../gdk/gdk.c:214 ../gdk/gdk.c:217 ../gtk/gtkmain.c:454 ../gtk/gtkmain.c:457
msgid "FLAGS"
msgstr "旗標"
@@ -698,7 +698,7 @@ msgstr "美工設計"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:156
#: ../gtk/gtkaccellabel.c:159
msgctxt "keyboard label"
msgid "Shift"
msgstr "Shift"
@@ -708,7 +708,7 @@ msgstr "Shift"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:162
#: ../gtk/gtkaccellabel.c:165
msgctxt "keyboard label"
msgid "Ctrl"
msgstr "Ctrl"
@@ -718,7 +718,7 @@ msgstr "Ctrl"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:168
#: ../gtk/gtkaccellabel.c:171
msgctxt "keyboard label"
msgid "Alt"
msgstr "Alt"
@@ -728,7 +728,7 @@ msgstr "Alt"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:802
#: ../gtk/gtkaccellabel.c:805
msgctxt "keyboard label"
msgid "Super"
msgstr "Super"
@@ -738,7 +738,7 @@ msgstr "Super"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:815
#: ../gtk/gtkaccellabel.c:818
msgctxt "keyboard label"
msgid "Hyper"
msgstr "Hyper"
@@ -748,17 +748,17 @@ msgstr "Hyper"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:829
#: ../gtk/gtkaccellabel.c:832
msgctxt "keyboard label"
msgid "Meta"
msgstr "Meta"
#: ../gtk/gtkaccellabel.c:845
#: ../gtk/gtkaccellabel.c:848
msgctxt "keyboard label"
msgid "Space"
msgstr "Space"
#: ../gtk/gtkaccellabel.c:848
#: ../gtk/gtkaccellabel.c:851
msgctxt "keyboard label"
msgid "Backslash"
msgstr "Backslash"
@@ -794,7 +794,7 @@ msgstr "找不到應用程式"
msgid "Select an application to open \"%s\""
msgstr "請選擇要用來開啟「%s」的應用程式"
#: ../gtk/gtkappchooserdialog.c:398 ../gtk/gtkappchooserwidget.c:654
#: ../gtk/gtkappchooserdialog.c:398 ../gtk/gtkappchooserwidget.c:657
#, c-format
msgid "No applications available to open \"%s\""
msgstr "沒有程式可開啟「%s」的應用程式"
@@ -824,23 +824,23 @@ msgstr "消除關聯"
msgid "Show other applications"
msgstr "顯示其他的應用程式"
#: ../gtk/gtkappchooserwidget.c:603
#: ../gtk/gtkappchooserwidget.c:606
msgid "Default Application"
msgstr "預設的應用程式"
#: ../gtk/gtkappchooserwidget.c:741
#: ../gtk/gtkappchooserwidget.c:744
msgid "Recommended Applications"
msgstr "建議的應用程式"
#: ../gtk/gtkappchooserwidget.c:756
#: ../gtk/gtkappchooserwidget.c:759
msgid "Related Applications"
msgstr "相關的應用程式"
#: ../gtk/gtkappchooserwidget.c:770
#: ../gtk/gtkappchooserwidget.c:773
msgid "Other Applications"
msgstr "其他的應用程式"
#: ../gtk/gtkapplication.c:1552
#: ../gtk/gtkapplication.c:1558
#, c-format
msgid ""
"%s cannot quit at this time:\n"
@@ -851,20 +851,20 @@ msgstr ""
"\n"
"%s"
#: ../gtk/gtkapplicationwindow.c:333 ../gtk/gtkprintoperation-unix.c:475
#: ../gtk/gtkapplicationwindow.c:333 ../gtk/gtkprintoperation-unix.c:480
#: ../gtk/gtkprintoperation-win32.c:1445
msgid "Application"
msgstr "應用程式"
#: ../gtk/gtkassistant.c:1004
#: ../gtk/gtkassistant.c:1008
msgid "C_ontinue"
msgstr "繼續(_O)"
#: ../gtk/gtkassistant.c:1007
#: ../gtk/gtkassistant.c:1011
msgid "Go _Back"
msgstr "後退(_B)"
#: ../gtk/gtkassistant.c:1011
#: ../gtk/gtkassistant.c:1015
msgid "_Finish"
msgstr "完成(_F)"
@@ -1003,7 +1003,7 @@ msgstr "無效"
#. * an accelerator when the cell is clicked to change the
#. * acelerator.
#.
#: ../gtk/gtkcellrendereraccel.c:416 ../gtk/gtkcellrendereraccel.c:745
#: ../gtk/gtkcellrendereraccel.c:416 ../gtk/gtkcellrendereraccel.c:747
msgid "New accelerator..."
msgstr "新增捷徑鍵…"
@@ -1403,7 +1403,7 @@ msgstr "Caps Lock 已開啟"
msgid "Select a File"
msgstr "選取檔案"
#: ../gtk/gtkfilechooserbutton.c:105 ../gtk/gtkfilechooserdefault.c:1817
#: ../gtk/gtkfilechooserbutton.c:105 ../gtk/gtkfilechooserdefault.c:1819
msgid "Desktop"
msgstr "桌面"
@@ -1419,48 +1419,48 @@ msgstr "其他…"
msgid "Type name of new folder"
msgstr "請輸入新資料夾名稱"
#: ../gtk/gtkfilechooserdefault.c:968
#: ../gtk/gtkfilechooserdefault.c:970
msgid "Could not retrieve information about the file"
msgstr "無法取得關於檔案的資訊"
#: ../gtk/gtkfilechooserdefault.c:979
#: ../gtk/gtkfilechooserdefault.c:981
msgid "Could not add a bookmark"
msgstr "無法加入書籤"
#: ../gtk/gtkfilechooserdefault.c:990
#: ../gtk/gtkfilechooserdefault.c:992
msgid "Could not remove bookmark"
msgstr "無法移除書籤"
#: ../gtk/gtkfilechooserdefault.c:1001
#: ../gtk/gtkfilechooserdefault.c:1003
msgid "The folder could not be created"
msgstr "無法建立資料夾"
#: ../gtk/gtkfilechooserdefault.c:1014
#: ../gtk/gtkfilechooserdefault.c:1016
msgid ""
"The folder could not be created, as a file with the same name already "
"exists. Try using a different name for the folder, or rename the file first."
msgstr "此資料夾無法建立,因為已有相同名稱的檔案存在。嘗試使用不同的資料夾名稱,或者先重新命名該檔案。"
#: ../gtk/gtkfilechooserdefault.c:1028
#: ../gtk/gtkfilechooserdefault.c:1030
msgid "You need to choose a valid filename."
msgstr "你需要選擇有效的檔案名稱"
#: ../gtk/gtkfilechooserdefault.c:1031
#: ../gtk/gtkfilechooserdefault.c:1033
#, c-format
msgid "Cannot create a file under %s as it is not a folder"
msgstr "不能在 %s 下建立檔案,因為它不是資料夾"
#: ../gtk/gtkfilechooserdefault.c:1043
#: ../gtk/gtkfilechooserdefault.c:1045
msgid ""
"You may only select folders. The item that you selected is not a folder; "
"try using a different item."
msgstr "你只能選擇資料夾。你所選取的項目不是資料夾;請嘗試使用不同的項目。"
#: ../gtk/gtkfilechooserdefault.c:1053
#: ../gtk/gtkfilechooserdefault.c:1055
msgid "Invalid file name"
msgstr "無效的檔案名稱"
#: ../gtk/gtkfilechooserdefault.c:1063
#: ../gtk/gtkfilechooserdefault.c:1065
msgid "The folder contents could not be displayed"
msgstr "無法顯示資料夾內容"
@@ -1468,218 +1468,218 @@ msgstr "無法顯示資料夾內容"
#. * is a hostname. Nautilus and the panel contain the same string
#. * to translate.
#.
#: ../gtk/gtkfilechooserdefault.c:1589
#: ../gtk/gtkfilechooserdefault.c:1591
#, c-format
msgid "%1$s on %2$s"
msgstr "%1$s 於 %2$s"
#: ../gtk/gtkfilechooserdefault.c:1738
#: ../gtk/gtkfilechooserdefault.c:1740
msgid "Search"
msgstr "搜尋"
#: ../gtk/gtkfilechooserdefault.c:1762 ../gtk/gtkfilechooserdefault.c:4988
#: ../gtk/gtkfilechooserdefault.c:1764 ../gtk/gtkfilechooserdefault.c:4990
msgid "Recently Used"
msgstr "最近使用"
msgstr "最近使用"
#: ../gtk/gtkfilechooserdefault.c:2361
#: ../gtk/gtkfilechooserdefault.c:2363
msgid "Select which types of files are shown"
msgstr "選擇顯示哪種類型的檔案"
#: ../gtk/gtkfilechooserdefault.c:2720
#: ../gtk/gtkfilechooserdefault.c:2722
#, c-format
msgid "Add the folder '%s' to the bookmarks"
msgstr "將資料夾「%s」加入書籤"
#: ../gtk/gtkfilechooserdefault.c:2764
#: ../gtk/gtkfilechooserdefault.c:2766
#, c-format
msgid "Add the current folder to the bookmarks"
msgstr "將目前的資料夾加入書籤"
#: ../gtk/gtkfilechooserdefault.c:2766
#: ../gtk/gtkfilechooserdefault.c:2768
#, c-format
msgid "Add the selected folders to the bookmarks"
msgstr "將已選的資料夾加入書籤"
#: ../gtk/gtkfilechooserdefault.c:2804
#: ../gtk/gtkfilechooserdefault.c:2806
#, c-format
msgid "Remove the bookmark '%s'"
msgstr "移除書籤「%s」"
#: ../gtk/gtkfilechooserdefault.c:2806
#: ../gtk/gtkfilechooserdefault.c:2808
#, c-format
msgid "Bookmark '%s' cannot be removed"
msgstr "無法移除書籤「%s」"
#: ../gtk/gtkfilechooserdefault.c:2813 ../gtk/gtkfilechooserdefault.c:3699
#: ../gtk/gtkfilechooserdefault.c:2815 ../gtk/gtkfilechooserdefault.c:3701
msgid "Remove the selected bookmark"
msgstr "移除已選的書籤"
#: ../gtk/gtkfilechooserdefault.c:3377
#: ../gtk/gtkfilechooserdefault.c:3379
msgid "Remove"
msgstr "移除"
#: ../gtk/gtkfilechooserdefault.c:3386
#: ../gtk/gtkfilechooserdefault.c:3388
msgid "Rename..."
msgstr "重新命名…"
#. Accessible object name for the file chooser's shortcuts pane
#: ../gtk/gtkfilechooserdefault.c:3550
#: ../gtk/gtkfilechooserdefault.c:3552
msgid "Places"
msgstr "位置"
#. Column header for the file chooser's shortcuts pane
#: ../gtk/gtkfilechooserdefault.c:3607
#: ../gtk/gtkfilechooserdefault.c:3609
msgid "_Places"
msgstr "位置(_P)"
#: ../gtk/gtkfilechooserdefault.c:3687
#: ../gtk/gtkfilechooserdefault.c:3689
msgid "Add the selected folder to the Bookmarks"
msgstr "將已選的資料夾加入書籤"
#: ../gtk/gtkfilechooserdefault.c:3948
#: ../gtk/gtkfilechooserdefault.c:3950
msgid "Could not select file"
msgstr "無法選取檔案"
#: ../gtk/gtkfilechooserdefault.c:4173
#: ../gtk/gtkfilechooserdefault.c:4175
msgid "_Visit this file"
msgstr "查閱這個檔案(_V)"
#: ../gtk/gtkfilechooserdefault.c:4176
#: ../gtk/gtkfilechooserdefault.c:4178
msgid "_Copy file's location"
msgstr "複製檔案的位置(_C)"
#: ../gtk/gtkfilechooserdefault.c:4179
#: ../gtk/gtkfilechooserdefault.c:4181
msgid "_Add to Bookmarks"
msgstr "加入書籤(_A)"
#: ../gtk/gtkfilechooserdefault.c:4186
#: ../gtk/gtkfilechooserdefault.c:4188
msgid "Show _Hidden Files"
msgstr "顯示隱藏檔(_H)"
#: ../gtk/gtkfilechooserdefault.c:4189
#: ../gtk/gtkfilechooserdefault.c:4191
msgid "Show _Size Column"
msgstr "顯示大小欄位(_S)"
#: ../gtk/gtkfilechooserdefault.c:4414
#: ../gtk/gtkfilechooserdefault.c:4416
msgid "Files"
msgstr "檔案"
#: ../gtk/gtkfilechooserdefault.c:4465
#: ../gtk/gtkfilechooserdefault.c:4467
msgid "Name"
msgstr "名稱"
#: ../gtk/gtkfilechooserdefault.c:4488
#: ../gtk/gtkfilechooserdefault.c:4490
msgid "Size"
msgstr "大小"
#: ../gtk/gtkfilechooserdefault.c:4502
#: ../gtk/gtkfilechooserdefault.c:4504
msgid "Modified"
msgstr "已修改"
#. Label
#: ../gtk/gtkfilechooserdefault.c:4595
#: ../gtk/gtkfilechooserdefault.c:4597
msgid "_Name:"
msgstr "名稱(_N):"
#: ../gtk/gtkfilechooserdefault.c:4826
#: ../gtk/gtkfilechooserdefault.c:4828
msgid "Type a file name"
msgstr "輸入檔案名稱"
#: ../gtk/gtkfilechooserdefault.c:4873 ../gtk/gtkfilechooserdefault.c:4884
#: ../gtk/gtkfilechooserdefault.c:4875 ../gtk/gtkfilechooserdefault.c:4886
msgid "Please select a folder below"
msgstr "請選擇下面的資料夾"
#: ../gtk/gtkfilechooserdefault.c:4879
#: ../gtk/gtkfilechooserdefault.c:4881
msgid "Please type a file name"
msgstr "請輸入檔案名稱"
#. Create Folder
#: ../gtk/gtkfilechooserdefault.c:4950
#: ../gtk/gtkfilechooserdefault.c:4952
msgid "Create Fo_lder"
msgstr "建立資料夾(_L)"
#: ../gtk/gtkfilechooserdefault.c:4998
#: ../gtk/gtkfilechooserdefault.c:5000
msgid "Search:"
msgstr "搜尋:"
#: ../gtk/gtkfilechooserdefault.c:5049
#: ../gtk/gtkfilechooserdefault.c:5051
msgid "_Location:"
msgstr "位置(_L):"
#: ../gtk/gtkfilechooserdefault.c:5500
#: ../gtk/gtkfilechooserdefault.c:5502
msgid "Save in _folder:"
msgstr "儲存於資料夾(_F):"
#: ../gtk/gtkfilechooserdefault.c:5502
#: ../gtk/gtkfilechooserdefault.c:5504
msgid "Create in _folder:"
msgstr "新增於資料夾(_F)"
#: ../gtk/gtkfilechooserdefault.c:6589
#: ../gtk/gtkfilechooserdefault.c:6591
#, c-format
msgid "Could not read the contents of %s"
msgstr "無法讀取 %s 的內容"
#: ../gtk/gtkfilechooserdefault.c:6593
#: ../gtk/gtkfilechooserdefault.c:6595
msgid "Could not read the contents of the folder"
msgstr "無法讀取資料夾的內容"
#: ../gtk/gtkfilechooserdefault.c:6686 ../gtk/gtkfilechooserdefault.c:6754
#: ../gtk/gtkfilechooserdefault.c:6934
#: ../gtk/gtkfilechooserdefault.c:6688 ../gtk/gtkfilechooserdefault.c:6756
#: ../gtk/gtkfilechooserdefault.c:6936
msgid "Unknown"
msgstr "不明"
#: ../gtk/gtkfilechooserdefault.c:6701
#: ../gtk/gtkfilechooserdefault.c:6703
msgid "%H:%M"
msgstr "%H:%M"
#: ../gtk/gtkfilechooserdefault.c:6703
#: ../gtk/gtkfilechooserdefault.c:6705
msgid "Yesterday at %H:%M"
msgstr "昨天 %H:%M"
#: ../gtk/gtkfilechooserdefault.c:7405
#: ../gtk/gtkfilechooserdefault.c:7407
msgid "Cannot change to folder because it is not local"
msgstr "無法進入資料夾,因為它不是本地資料夾"
#: ../gtk/gtkfilechooserdefault.c:8009 ../gtk/gtkfilechooserdefault.c:8030
#: ../gtk/gtkfilechooserdefault.c:8011 ../gtk/gtkfilechooserdefault.c:8032
#, c-format
msgid "Shortcut %s already exists"
msgstr "捷徑 %s 已經存在"
#: ../gtk/gtkfilechooserdefault.c:8120
#: ../gtk/gtkfilechooserdefault.c:8122
#, c-format
msgid "Shortcut %s does not exist"
msgstr "捷徑 %s 不存在"
#: ../gtk/gtkfilechooserdefault.c:8366 ../gtk/gtkprintunixdialog.c:548
#: ../gtk/gtkfilechooserdefault.c:8368 ../gtk/gtkprintunixdialog.c:548
#, c-format
msgid "A file named \"%s\" already exists. Do you want to replace it?"
msgstr "名為「%s」的檔案已存在。是否要取代它"
#: ../gtk/gtkfilechooserdefault.c:8369 ../gtk/gtkprintunixdialog.c:552
#: ../gtk/gtkfilechooserdefault.c:8371 ../gtk/gtkprintunixdialog.c:552
#, c-format
msgid ""
"The file already exists in \"%s\". Replacing it will overwrite its contents."
msgstr "該檔案已存在於「%s」。取代它會覆蓋它的內容。"
#: ../gtk/gtkfilechooserdefault.c:8374 ../gtk/gtkprintunixdialog.c:559
#: ../gtk/gtkfilechooserdefault.c:8376 ../gtk/gtkprintunixdialog.c:559
msgid "_Replace"
msgstr "取代(_R)"
#: ../gtk/gtkfilechooserdefault.c:9181
#: ../gtk/gtkfilechooserdefault.c:9183
msgid "Could not start the search process"
msgstr "無法開始搜尋程序"
#: ../gtk/gtkfilechooserdefault.c:9182
#: ../gtk/gtkfilechooserdefault.c:9184
msgid ""
"The program was not able to create a connection to the indexer daemon. "
"Please make sure it is running."
msgstr "此程式無法建立至 indexer 伺服程式的連線。請確認它是否已執行。"
#: ../gtk/gtkfilechooserdefault.c:9196
#: ../gtk/gtkfilechooserdefault.c:9198
msgid "Could not send the search request"
msgstr "無法傳送搜尋要求"
#: ../gtk/gtkfilechooserdefault.c:9806
#: ../gtk/gtkfilechooserdefault.c:9808
#, c-format
msgid "Could not mount %s"
msgstr "無法掛載 %s"
@@ -1842,27 +1842,27 @@ msgstr ""
"請聯絡你的系統管理員"
#. Description of --gtk-module=MODULES in --help output
#: ../gtk/gtkmain.c:446
#: ../gtk/gtkmain.c:447
msgid "Load additional GTK+ modules"
msgstr "載入額外的 GTK+ 模組"
#. Placeholder in --gtk-module=MODULES in --help output
#: ../gtk/gtkmain.c:447
#: ../gtk/gtkmain.c:448
msgid "MODULES"
msgstr "模組"
#. Description of --g-fatal-warnings in --help output
#: ../gtk/gtkmain.c:449
#: ../gtk/gtkmain.c:450
msgid "Make all warnings fatal"
msgstr "把所有的警告訊息都當成嚴重錯誤"
#. Description of --gtk-debug=FLAGS in --help output
#: ../gtk/gtkmain.c:452
#: ../gtk/gtkmain.c:453
msgid "GTK+ debugging flags to set"
msgstr "準備設定的 GTK+ 偵錯旗標"
#. Description of --gtk-no-debug=FLAGS in --help output
#: ../gtk/gtkmain.c:455
#: ../gtk/gtkmain.c:456
msgid "GTK+ debugging flags to unset"
msgstr "準備去除的 GTK+ 偵錯旗標"
@@ -1871,73 +1871,73 @@ msgstr "準備去除的 GTK+ 偵錯旗標"
#. * Do *not* translate it to "predefinito:LTR", if it
#. * it isn't default:LTR or default:RTL it will not work
#.
#: ../gtk/gtkmain.c:706
#: ../gtk/gtkmain.c:704
msgid "default:LTR"
msgstr "default:LTR"
#: ../gtk/gtkmain.c:774
#: ../gtk/gtkmain.c:772
#, c-format
msgid "Cannot open display: %s"
msgstr "無法開啟畫面:%s"
#: ../gtk/gtkmain.c:840
#: ../gtk/gtkmain.c:838
msgid "GTK+ Options"
msgstr "GTK+ 選項"
#: ../gtk/gtkmain.c:840
#: ../gtk/gtkmain.c:838
msgid "Show GTK+ Options"
msgstr "顯示 GTK+ 選項"
#: ../gtk/gtkmountoperation.c:532
#: ../gtk/gtkmountoperation.c:535
msgid "Co_nnect"
msgstr "連線(_N)"
#: ../gtk/gtkmountoperation.c:606
#: ../gtk/gtkmountoperation.c:609
msgid "Connect As"
msgstr "連線身分"
#: ../gtk/gtkmountoperation.c:615
#: ../gtk/gtkmountoperation.c:618
msgid "_Anonymous"
msgstr "匿名(_A)"
#: ../gtk/gtkmountoperation.c:624
#: ../gtk/gtkmountoperation.c:627
msgid "Registered U_ser"
msgstr "已註冊使用者(_S)"
#: ../gtk/gtkmountoperation.c:635
#: ../gtk/gtkmountoperation.c:638
msgid "_Username"
msgstr "使用者名稱(_U)"
#: ../gtk/gtkmountoperation.c:640
#: ../gtk/gtkmountoperation.c:643
msgid "_Domain"
msgstr "網域(_D)"
#: ../gtk/gtkmountoperation.c:646
#: ../gtk/gtkmountoperation.c:649
msgid "_Password"
msgstr "密碼(_P)"
#: ../gtk/gtkmountoperation.c:668
#: ../gtk/gtkmountoperation.c:671
msgid "Forget password _immediately"
msgstr "立刻忘記密碼(_I)"
#: ../gtk/gtkmountoperation.c:678
#: ../gtk/gtkmountoperation.c:681
msgid "Remember password until you _logout"
msgstr "記憶密碼到登出之前(_L)"
#: ../gtk/gtkmountoperation.c:688
#: ../gtk/gtkmountoperation.c:691
msgid "Remember _forever"
msgstr "永遠記住密碼(_F)"
#: ../gtk/gtkmountoperation.c:1077
#: ../gtk/gtkmountoperation.c:1080
#, c-format
msgid "Unknown Application (PID %d)"
msgstr "不明的應用程式PID %d"
#: ../gtk/gtkmountoperation.c:1260
#: ../gtk/gtkmountoperation.c:1263
msgid "Unable to end process"
msgstr "無法終止程序"
#: ../gtk/gtkmountoperation.c:1297
#: ../gtk/gtkmountoperation.c:1300
msgid "_End Process"
msgstr "終止程序(_E)"
@@ -1980,14 +1980,14 @@ msgstr "第 %u 頁"
#. Translators: the format here is used to build the string that will be rendered
#. * in the number emblem.
#.
#: ../gtk/gtknumerableicon.c:481
#: ../gtk/gtknumerableicon.c:482
#, c-format
msgctxt "Number format"
msgid "%d"
msgstr "%d"
#: ../gtk/gtkpagesetup.c:646 ../gtk/gtkpapersize.c:846
#: ../gtk/gtkpapersize.c:886
#: ../gtk/gtkpagesetup.c:646 ../gtk/gtkpapersize.c:848
#: ../gtk/gtkpapersize.c:888
msgid "Not a valid page setup file"
msgstr "不是有效的頁面設定檔案"
@@ -2046,7 +2046,7 @@ msgstr "向下路徑"
msgid "File System Root"
msgstr "檔案系統根"
#: ../gtk/gtkprintbackend.c:748
#: ../gtk/gtkprintbackend.c:750
msgid "Authentication"
msgstr "驗證"
@@ -2112,29 +2112,29 @@ msgctxt "print operation status"
msgid "Finished with error"
msgstr "已完成但發生錯誤"
#: ../gtk/gtkprintoperation.c:2352
#: ../gtk/gtkprintoperation.c:2349
#, c-format
msgid "Preparing %d"
msgstr "正在準備 %d"
#: ../gtk/gtkprintoperation.c:2354 ../gtk/gtkprintoperation.c:2984
#: ../gtk/gtkprintoperation.c:2351 ../gtk/gtkprintoperation.c:2983
msgid "Preparing"
msgstr "正在準備"
#: ../gtk/gtkprintoperation.c:2357
#: ../gtk/gtkprintoperation.c:2354
#, c-format
msgid "Printing %d"
msgstr "正在打印 %d"
#: ../gtk/gtkprintoperation.c:3014
#: ../gtk/gtkprintoperation.c:3013
msgid "Error creating print preview"
msgstr "建立打印預覽時發生錯誤"
#: ../gtk/gtkprintoperation.c:3017
#: ../gtk/gtkprintoperation.c:3016
msgid "The most probable reason is that a temporary file could not be created."
msgstr "最可能的原因是無法建立暫存檔案。"
#: ../gtk/gtkprintoperation-unix.c:302
#: ../gtk/gtkprintoperation-unix.c:307
msgid "Error launching preview"
msgstr "執行預覽時發生錯誤"
@@ -3301,7 +3301,7 @@ msgstr "第 %2$d 行第 %3$d 字有非預設的開始標記「%1$s」"
msgid "Unexpected character data on line %d char %d"
msgstr "第 %d 行第 %d 字有非預設的字符資料"
#: ../gtk/gtkuimanager.c:2738
#: ../gtk/gtkuimanager.c:2694
msgid "Empty"
msgstr "空的"

View File

@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+ 3.3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-05 20:10+0800\n"
"PO-Revision-Date: 2012-09-05 16:20+0800\n"
"Last-Translator: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>\n"
"POT-Creation-Date: 2012-11-07 02:40+0800\n"
"PO-Revision-Date: 2012-11-01 22:07+0800\n"
"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
"Language-Team: <>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
@@ -69,7 +69,7 @@ msgstr "準備設定的 GDK 偵錯旗標"
#. Placeholder in --gdk-no-debug=FLAGS in --help output
#. Placeholder in --gtk-debug=FLAGS in --help output
#. Placeholder in --gtk-no-debug=FLAGS in --help output
#: ../gdk/gdk.c:214 ../gdk/gdk.c:217 ../gtk/gtkmain.c:453 ../gtk/gtkmain.c:456
#: ../gdk/gdk.c:214 ../gdk/gdk.c:217 ../gtk/gtkmain.c:454 ../gtk/gtkmain.c:457
msgid "FLAGS"
msgstr "旗標"
@@ -699,7 +699,7 @@ msgstr "美工設計"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:156
#: ../gtk/gtkaccellabel.c:159
msgctxt "keyboard label"
msgid "Shift"
msgstr "Shift"
@@ -709,7 +709,7 @@ msgstr "Shift"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:162
#: ../gtk/gtkaccellabel.c:165
msgctxt "keyboard label"
msgid "Ctrl"
msgstr "Ctrl"
@@ -719,7 +719,7 @@ msgstr "Ctrl"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:168
#: ../gtk/gtkaccellabel.c:171
msgctxt "keyboard label"
msgid "Alt"
msgstr "Alt"
@@ -729,7 +729,7 @@ msgstr "Alt"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:802
#: ../gtk/gtkaccellabel.c:805
msgctxt "keyboard label"
msgid "Super"
msgstr "Super"
@@ -739,7 +739,7 @@ msgstr "Super"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:815
#: ../gtk/gtkaccellabel.c:818
msgctxt "keyboard label"
msgid "Hyper"
msgstr "Hyper"
@@ -749,17 +749,17 @@ msgstr "Hyper"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../gtk/gtkaccellabel.c:829
#: ../gtk/gtkaccellabel.c:832
msgctxt "keyboard label"
msgid "Meta"
msgstr "Meta"
#: ../gtk/gtkaccellabel.c:845
#: ../gtk/gtkaccellabel.c:848
msgctxt "keyboard label"
msgid "Space"
msgstr "Space"
#: ../gtk/gtkaccellabel.c:848
#: ../gtk/gtkaccellabel.c:851
msgctxt "keyboard label"
msgid "Backslash"
msgstr "Backslash"
@@ -795,7 +795,7 @@ msgstr "找不到應用程式"
msgid "Select an application to open \"%s\""
msgstr "請選擇要用來開啟「%s」的應用程式"
#: ../gtk/gtkappchooserdialog.c:398 ../gtk/gtkappchooserwidget.c:654
#: ../gtk/gtkappchooserdialog.c:398 ../gtk/gtkappchooserwidget.c:657
#, c-format
msgid "No applications available to open \"%s\""
msgstr "沒有程式可開啟「%s」的應用程式"
@@ -827,23 +827,23 @@ msgstr "消除關聯"
msgid "Show other applications"
msgstr "顯示其他的應用程式"
#: ../gtk/gtkappchooserwidget.c:603
#: ../gtk/gtkappchooserwidget.c:606
msgid "Default Application"
msgstr "預設的應用程式"
#: ../gtk/gtkappchooserwidget.c:741
#: ../gtk/gtkappchooserwidget.c:744
msgid "Recommended Applications"
msgstr "建議的應用程式"
#: ../gtk/gtkappchooserwidget.c:756
#: ../gtk/gtkappchooserwidget.c:759
msgid "Related Applications"
msgstr "相關的應用程式"
#: ../gtk/gtkappchooserwidget.c:770
#: ../gtk/gtkappchooserwidget.c:773
msgid "Other Applications"
msgstr "其他的應用程式"
#: ../gtk/gtkapplication.c:1552
#: ../gtk/gtkapplication.c:1558
#, c-format
msgid ""
"%s cannot quit at this time:\n"
@@ -854,20 +854,20 @@ msgstr ""
"\n"
"%s"
#: ../gtk/gtkapplicationwindow.c:333 ../gtk/gtkprintoperation-unix.c:475
#: ../gtk/gtkapplicationwindow.c:333 ../gtk/gtkprintoperation-unix.c:480
#: ../gtk/gtkprintoperation-win32.c:1445
msgid "Application"
msgstr "應用程式"
#: ../gtk/gtkassistant.c:1004
#: ../gtk/gtkassistant.c:1008
msgid "C_ontinue"
msgstr "繼續(_O)"
#: ../gtk/gtkassistant.c:1007
#: ../gtk/gtkassistant.c:1011
msgid "Go _Back"
msgstr "後退(_B)"
#: ../gtk/gtkassistant.c:1011
#: ../gtk/gtkassistant.c:1015
msgid "_Finish"
msgstr "完成(_F)"
@@ -1006,7 +1006,7 @@ msgstr "無效"
#. * an accelerator when the cell is clicked to change the
#. * acelerator.
#.
#: ../gtk/gtkcellrendereraccel.c:416 ../gtk/gtkcellrendereraccel.c:745
#: ../gtk/gtkcellrendereraccel.c:416 ../gtk/gtkcellrendereraccel.c:747
msgid "New accelerator..."
msgstr "新增捷徑鍵…"
@@ -1406,7 +1406,7 @@ msgstr "Caps Lock 已開啟"
msgid "Select a File"
msgstr "選取檔案"
#: ../gtk/gtkfilechooserbutton.c:105 ../gtk/gtkfilechooserdefault.c:1817
#: ../gtk/gtkfilechooserbutton.c:105 ../gtk/gtkfilechooserdefault.c:1819
msgid "Desktop"
msgstr "桌面"
@@ -1422,23 +1422,23 @@ msgstr "其他…"
msgid "Type name of new folder"
msgstr "請輸入新資料夾名稱"
#: ../gtk/gtkfilechooserdefault.c:968
#: ../gtk/gtkfilechooserdefault.c:970
msgid "Could not retrieve information about the file"
msgstr "無法取得關於檔案的資訊"
#: ../gtk/gtkfilechooserdefault.c:979
#: ../gtk/gtkfilechooserdefault.c:981
msgid "Could not add a bookmark"
msgstr "無法加入書籤"
#: ../gtk/gtkfilechooserdefault.c:990
#: ../gtk/gtkfilechooserdefault.c:992
msgid "Could not remove bookmark"
msgstr "無法移除書籤"
#: ../gtk/gtkfilechooserdefault.c:1001
#: ../gtk/gtkfilechooserdefault.c:1003
msgid "The folder could not be created"
msgstr "無法建立資料夾"
#: ../gtk/gtkfilechooserdefault.c:1014
#: ../gtk/gtkfilechooserdefault.c:1016
msgid ""
"The folder could not be created, as a file with the same name already "
"exists. Try using a different name for the folder, or rename the file first."
@@ -1446,26 +1446,26 @@ msgstr ""
"此資料夾無法建立,因為已有相同名稱的檔案存在。試著使用不同的資料夾名稱,或者"
"先重新命名該檔案。"
#: ../gtk/gtkfilechooserdefault.c:1028
#: ../gtk/gtkfilechooserdefault.c:1030
msgid "You need to choose a valid filename."
msgstr "您需要選擇有效的檔案名稱"
#: ../gtk/gtkfilechooserdefault.c:1031
#: ../gtk/gtkfilechooserdefault.c:1033
#, c-format
msgid "Cannot create a file under %s as it is not a folder"
msgstr "不能在 %s 下建立檔案,因為它不是資料夾"
#: ../gtk/gtkfilechooserdefault.c:1043
#: ../gtk/gtkfilechooserdefault.c:1045
msgid ""
"You may only select folders. The item that you selected is not a folder; "
"try using a different item."
msgstr "您只能選擇資料夾。您所選取的項目不是資料夾;請試著使用不同的項目。"
#: ../gtk/gtkfilechooserdefault.c:1053
#: ../gtk/gtkfilechooserdefault.c:1055
msgid "Invalid file name"
msgstr "無效的檔案名稱"
#: ../gtk/gtkfilechooserdefault.c:1063
#: ../gtk/gtkfilechooserdefault.c:1065
msgid "The folder contents could not be displayed"
msgstr "無法顯示資料夾內容"
@@ -1473,218 +1473,218 @@ msgstr "無法顯示資料夾內容"
#. * is a hostname. Nautilus and the panel contain the same string
#. * to translate.
#.
#: ../gtk/gtkfilechooserdefault.c:1589
#: ../gtk/gtkfilechooserdefault.c:1591
#, c-format
msgid "%1$s on %2$s"
msgstr "%1$s 於 %2$s"
#: ../gtk/gtkfilechooserdefault.c:1738
#: ../gtk/gtkfilechooserdefault.c:1740
msgid "Search"
msgstr "搜尋"
#: ../gtk/gtkfilechooserdefault.c:1762 ../gtk/gtkfilechooserdefault.c:4988
#: ../gtk/gtkfilechooserdefault.c:1764 ../gtk/gtkfilechooserdefault.c:4990
msgid "Recently Used"
msgstr "最近使用"
msgstr "最近使用"
#: ../gtk/gtkfilechooserdefault.c:2361
#: ../gtk/gtkfilechooserdefault.c:2363
msgid "Select which types of files are shown"
msgstr "選擇顯示哪種類型的檔案"
#: ../gtk/gtkfilechooserdefault.c:2720
#: ../gtk/gtkfilechooserdefault.c:2722
#, c-format
msgid "Add the folder '%s' to the bookmarks"
msgstr "將資料夾「%s」加入書籤"
#: ../gtk/gtkfilechooserdefault.c:2764
#: ../gtk/gtkfilechooserdefault.c:2766
#, c-format
msgid "Add the current folder to the bookmarks"
msgstr "將目前的資料夾加入書籤"
#: ../gtk/gtkfilechooserdefault.c:2766
#: ../gtk/gtkfilechooserdefault.c:2768
#, c-format
msgid "Add the selected folders to the bookmarks"
msgstr "將已選的資料夾加入書籤"
#: ../gtk/gtkfilechooserdefault.c:2804
#: ../gtk/gtkfilechooserdefault.c:2806
#, c-format
msgid "Remove the bookmark '%s'"
msgstr "移除書籤「%s」"
#: ../gtk/gtkfilechooserdefault.c:2806
#: ../gtk/gtkfilechooserdefault.c:2808
#, c-format
msgid "Bookmark '%s' cannot be removed"
msgstr "無法移除書籤「%s」"
#: ../gtk/gtkfilechooserdefault.c:2813 ../gtk/gtkfilechooserdefault.c:3699
#: ../gtk/gtkfilechooserdefault.c:2815 ../gtk/gtkfilechooserdefault.c:3701
msgid "Remove the selected bookmark"
msgstr "移除已選的書籤"
#: ../gtk/gtkfilechooserdefault.c:3377
#: ../gtk/gtkfilechooserdefault.c:3379
msgid "Remove"
msgstr "移除"
#: ../gtk/gtkfilechooserdefault.c:3386
#: ../gtk/gtkfilechooserdefault.c:3388
msgid "Rename..."
msgstr "重新命名…"
#. Accessible object name for the file chooser's shortcuts pane
#: ../gtk/gtkfilechooserdefault.c:3550
#: ../gtk/gtkfilechooserdefault.c:3552
msgid "Places"
msgstr "位置"
#. Column header for the file chooser's shortcuts pane
#: ../gtk/gtkfilechooserdefault.c:3607
#: ../gtk/gtkfilechooserdefault.c:3609
msgid "_Places"
msgstr "位置(_P)"
#: ../gtk/gtkfilechooserdefault.c:3687
#: ../gtk/gtkfilechooserdefault.c:3689
msgid "Add the selected folder to the Bookmarks"
msgstr "將已選的資料夾加入書籤"
#: ../gtk/gtkfilechooserdefault.c:3948
#: ../gtk/gtkfilechooserdefault.c:3950
msgid "Could not select file"
msgstr "無法選取檔案"
#: ../gtk/gtkfilechooserdefault.c:4173
#: ../gtk/gtkfilechooserdefault.c:4175
msgid "_Visit this file"
msgstr "查閱這個檔案(_V)"
#: ../gtk/gtkfilechooserdefault.c:4176
#: ../gtk/gtkfilechooserdefault.c:4178
msgid "_Copy file's location"
msgstr "複製檔案的位置(_C)"
#: ../gtk/gtkfilechooserdefault.c:4179
#: ../gtk/gtkfilechooserdefault.c:4181
msgid "_Add to Bookmarks"
msgstr "加入書籤(_A)"
#: ../gtk/gtkfilechooserdefault.c:4186
#: ../gtk/gtkfilechooserdefault.c:4188
msgid "Show _Hidden Files"
msgstr "顯示隱藏檔(_H)"
#: ../gtk/gtkfilechooserdefault.c:4189
#: ../gtk/gtkfilechooserdefault.c:4191
msgid "Show _Size Column"
msgstr "顯示大小欄位(_S)"
#: ../gtk/gtkfilechooserdefault.c:4414
#: ../gtk/gtkfilechooserdefault.c:4416
msgid "Files"
msgstr "檔案"
#: ../gtk/gtkfilechooserdefault.c:4465
#: ../gtk/gtkfilechooserdefault.c:4467
msgid "Name"
msgstr "名稱"
#: ../gtk/gtkfilechooserdefault.c:4488
#: ../gtk/gtkfilechooserdefault.c:4490
msgid "Size"
msgstr "大小"
#: ../gtk/gtkfilechooserdefault.c:4502
#: ../gtk/gtkfilechooserdefault.c:4504
msgid "Modified"
msgstr "已修改"
#. Label
#: ../gtk/gtkfilechooserdefault.c:4595
#: ../gtk/gtkfilechooserdefault.c:4597
msgid "_Name:"
msgstr "名稱(_N):"
#: ../gtk/gtkfilechooserdefault.c:4826
#: ../gtk/gtkfilechooserdefault.c:4828
msgid "Type a file name"
msgstr "輸入檔案名稱"
#: ../gtk/gtkfilechooserdefault.c:4873 ../gtk/gtkfilechooserdefault.c:4884
#: ../gtk/gtkfilechooserdefault.c:4875 ../gtk/gtkfilechooserdefault.c:4886
msgid "Please select a folder below"
msgstr "請選擇下面的資料夾"
#: ../gtk/gtkfilechooserdefault.c:4879
#: ../gtk/gtkfilechooserdefault.c:4881
msgid "Please type a file name"
msgstr "請輸入檔案名稱"
#. Create Folder
#: ../gtk/gtkfilechooserdefault.c:4950
#: ../gtk/gtkfilechooserdefault.c:4952
msgid "Create Fo_lder"
msgstr "建立資料夾(_L)"
#: ../gtk/gtkfilechooserdefault.c:4998
#: ../gtk/gtkfilechooserdefault.c:5000
msgid "Search:"
msgstr "搜尋:"
#: ../gtk/gtkfilechooserdefault.c:5049
#: ../gtk/gtkfilechooserdefault.c:5051
msgid "_Location:"
msgstr "位置(_L):"
#: ../gtk/gtkfilechooserdefault.c:5500
#: ../gtk/gtkfilechooserdefault.c:5502
msgid "Save in _folder:"
msgstr "儲存於資料夾(_F):"
#: ../gtk/gtkfilechooserdefault.c:5502
#: ../gtk/gtkfilechooserdefault.c:5504
msgid "Create in _folder:"
msgstr "新增於資料夾(_F)"
#: ../gtk/gtkfilechooserdefault.c:6589
#: ../gtk/gtkfilechooserdefault.c:6591
#, c-format
msgid "Could not read the contents of %s"
msgstr "無法讀取 %s 的內容"
#: ../gtk/gtkfilechooserdefault.c:6593
#: ../gtk/gtkfilechooserdefault.c:6595
msgid "Could not read the contents of the folder"
msgstr "無法讀取資料夾的內容"
#: ../gtk/gtkfilechooserdefault.c:6686 ../gtk/gtkfilechooserdefault.c:6754
#: ../gtk/gtkfilechooserdefault.c:6934
#: ../gtk/gtkfilechooserdefault.c:6688 ../gtk/gtkfilechooserdefault.c:6756
#: ../gtk/gtkfilechooserdefault.c:6936
msgid "Unknown"
msgstr "不明"
#: ../gtk/gtkfilechooserdefault.c:6701
#: ../gtk/gtkfilechooserdefault.c:6703
msgid "%H:%M"
msgstr "%H:%M"
#: ../gtk/gtkfilechooserdefault.c:6703
#: ../gtk/gtkfilechooserdefault.c:6705
msgid "Yesterday at %H:%M"
msgstr "昨天 %H:%M"
#: ../gtk/gtkfilechooserdefault.c:7405
#: ../gtk/gtkfilechooserdefault.c:7407
msgid "Cannot change to folder because it is not local"
msgstr "無法進入資料夾,因為它不是本地資料夾"
#: ../gtk/gtkfilechooserdefault.c:8009 ../gtk/gtkfilechooserdefault.c:8030
#: ../gtk/gtkfilechooserdefault.c:8011 ../gtk/gtkfilechooserdefault.c:8032
#, c-format
msgid "Shortcut %s already exists"
msgstr "捷徑 %s 已經存在"
#: ../gtk/gtkfilechooserdefault.c:8120
#: ../gtk/gtkfilechooserdefault.c:8122
#, c-format
msgid "Shortcut %s does not exist"
msgstr "捷徑 %s 不存在"
#: ../gtk/gtkfilechooserdefault.c:8366 ../gtk/gtkprintunixdialog.c:548
#: ../gtk/gtkfilechooserdefault.c:8368 ../gtk/gtkprintunixdialog.c:548
#, c-format
msgid "A file named \"%s\" already exists. Do you want to replace it?"
msgstr "名為「%s」的檔案已存在。是否要取代它"
#: ../gtk/gtkfilechooserdefault.c:8369 ../gtk/gtkprintunixdialog.c:552
#: ../gtk/gtkfilechooserdefault.c:8371 ../gtk/gtkprintunixdialog.c:552
#, c-format
msgid ""
"The file already exists in \"%s\". Replacing it will overwrite its contents."
msgstr "該檔案已存在於「%s」。取代它會覆蓋它的內容。"
#: ../gtk/gtkfilechooserdefault.c:8374 ../gtk/gtkprintunixdialog.c:559
#: ../gtk/gtkfilechooserdefault.c:8376 ../gtk/gtkprintunixdialog.c:559
msgid "_Replace"
msgstr "取代(_R)"
#: ../gtk/gtkfilechooserdefault.c:9181
#: ../gtk/gtkfilechooserdefault.c:9183
msgid "Could not start the search process"
msgstr "無法開始搜尋程序"
#: ../gtk/gtkfilechooserdefault.c:9182
#: ../gtk/gtkfilechooserdefault.c:9184
msgid ""
"The program was not able to create a connection to the indexer daemon. "
"Please make sure it is running."
msgstr "此程式無法建立至 indexer 伺服程式的連線。請確認它是否已執行。"
#: ../gtk/gtkfilechooserdefault.c:9196
#: ../gtk/gtkfilechooserdefault.c:9198
msgid "Could not send the search request"
msgstr "無法傳送搜尋要求"
#: ../gtk/gtkfilechooserdefault.c:9806
#: ../gtk/gtkfilechooserdefault.c:9808
#, c-format
msgid "Could not mount %s"
msgstr "無法掛載 %s"
@@ -1847,27 +1847,27 @@ msgstr ""
"請聯絡您的系統管理員"
#. Description of --gtk-module=MODULES in --help output
#: ../gtk/gtkmain.c:446
#: ../gtk/gtkmain.c:447
msgid "Load additional GTK+ modules"
msgstr "載入額外的 GTK+ 模組"
#. Placeholder in --gtk-module=MODULES in --help output
#: ../gtk/gtkmain.c:447
#: ../gtk/gtkmain.c:448
msgid "MODULES"
msgstr "模組"
#. Description of --g-fatal-warnings in --help output
#: ../gtk/gtkmain.c:449
#: ../gtk/gtkmain.c:450
msgid "Make all warnings fatal"
msgstr "把所有的警告訊息都當成嚴重錯誤"
#. Description of --gtk-debug=FLAGS in --help output
#: ../gtk/gtkmain.c:452
#: ../gtk/gtkmain.c:453
msgid "GTK+ debugging flags to set"
msgstr "準備設定的 GTK+ 偵錯旗標"
#. Description of --gtk-no-debug=FLAGS in --help output
#: ../gtk/gtkmain.c:455
#: ../gtk/gtkmain.c:456
msgid "GTK+ debugging flags to unset"
msgstr "準備去除的 GTK+ 偵錯旗標"
@@ -1876,73 +1876,73 @@ msgstr "準備去除的 GTK+ 偵錯旗標"
#. * Do *not* translate it to "predefinito:LTR", if it
#. * it isn't default:LTR or default:RTL it will not work
#.
#: ../gtk/gtkmain.c:706
#: ../gtk/gtkmain.c:704
msgid "default:LTR"
msgstr "default:LTR"
#: ../gtk/gtkmain.c:774
#: ../gtk/gtkmain.c:772
#, c-format
msgid "Cannot open display: %s"
msgstr "無法開啟畫面:%s"
#: ../gtk/gtkmain.c:840
#: ../gtk/gtkmain.c:838
msgid "GTK+ Options"
msgstr "GTK+ 選項"
#: ../gtk/gtkmain.c:840
#: ../gtk/gtkmain.c:838
msgid "Show GTK+ Options"
msgstr "顯示 GTK+ 選項"
#: ../gtk/gtkmountoperation.c:532
#: ../gtk/gtkmountoperation.c:535
msgid "Co_nnect"
msgstr "連線(_N)"
#: ../gtk/gtkmountoperation.c:606
#: ../gtk/gtkmountoperation.c:609
msgid "Connect As"
msgstr "連線身分"
#: ../gtk/gtkmountoperation.c:615
#: ../gtk/gtkmountoperation.c:618
msgid "_Anonymous"
msgstr "匿名(_A)"
#: ../gtk/gtkmountoperation.c:624
#: ../gtk/gtkmountoperation.c:627
msgid "Registered U_ser"
msgstr "已註冊使用者(_S)"
#: ../gtk/gtkmountoperation.c:635
#: ../gtk/gtkmountoperation.c:638
msgid "_Username"
msgstr "使用者名稱(_U)"
#: ../gtk/gtkmountoperation.c:640
#: ../gtk/gtkmountoperation.c:643
msgid "_Domain"
msgstr "網域(_D)"
#: ../gtk/gtkmountoperation.c:646
#: ../gtk/gtkmountoperation.c:649
msgid "_Password"
msgstr "密碼(_P)"
#: ../gtk/gtkmountoperation.c:668
#: ../gtk/gtkmountoperation.c:671
msgid "Forget password _immediately"
msgstr "立刻忘記密碼(_I)"
#: ../gtk/gtkmountoperation.c:678
#: ../gtk/gtkmountoperation.c:681
msgid "Remember password until you _logout"
msgstr "記憶密碼到登出之前(_L)"
#: ../gtk/gtkmountoperation.c:688
#: ../gtk/gtkmountoperation.c:691
msgid "Remember _forever"
msgstr "永遠記住密碼(_F)"
#: ../gtk/gtkmountoperation.c:1077
#: ../gtk/gtkmountoperation.c:1080
#, c-format
msgid "Unknown Application (PID %d)"
msgstr "不明的應用程式PID %d"
#: ../gtk/gtkmountoperation.c:1260
#: ../gtk/gtkmountoperation.c:1263
msgid "Unable to end process"
msgstr "無法終止程序"
#: ../gtk/gtkmountoperation.c:1297
#: ../gtk/gtkmountoperation.c:1300
msgid "_End Process"
msgstr "終止程序(_E)"
@@ -1985,14 +1985,14 @@ msgstr "第 %u 頁"
#. Translators: the format here is used to build the string that will be rendered
#. * in the number emblem.
#.
#: ../gtk/gtknumerableicon.c:481
#: ../gtk/gtknumerableicon.c:482
#, c-format
msgctxt "Number format"
msgid "%d"
msgstr "%d"
#: ../gtk/gtkpagesetup.c:646 ../gtk/gtkpapersize.c:846
#: ../gtk/gtkpapersize.c:886
#: ../gtk/gtkpagesetup.c:646 ../gtk/gtkpapersize.c:848
#: ../gtk/gtkpapersize.c:888
msgid "Not a valid page setup file"
msgstr "不是有效的頁面設定檔案"
@@ -2051,7 +2051,7 @@ msgstr "向下路徑"
msgid "File System Root"
msgstr "檔案系統根"
#: ../gtk/gtkprintbackend.c:748
#: ../gtk/gtkprintbackend.c:750
msgid "Authentication"
msgstr "驗證"
@@ -2117,29 +2117,29 @@ msgctxt "print operation status"
msgid "Finished with error"
msgstr "已完成但發生錯誤"
#: ../gtk/gtkprintoperation.c:2352
#: ../gtk/gtkprintoperation.c:2349
#, c-format
msgid "Preparing %d"
msgstr "正在準備 %d"
#: ../gtk/gtkprintoperation.c:2354 ../gtk/gtkprintoperation.c:2984
#: ../gtk/gtkprintoperation.c:2351 ../gtk/gtkprintoperation.c:2983
msgid "Preparing"
msgstr "正在準備"
#: ../gtk/gtkprintoperation.c:2357
#: ../gtk/gtkprintoperation.c:2354
#, c-format
msgid "Printing %d"
msgstr "正在列印 %d"
#: ../gtk/gtkprintoperation.c:3014
#: ../gtk/gtkprintoperation.c:3013
msgid "Error creating print preview"
msgstr "建立列印預覽時發生錯誤"
#: ../gtk/gtkprintoperation.c:3017
#: ../gtk/gtkprintoperation.c:3016
msgid "The most probable reason is that a temporary file could not be created."
msgstr "最可能的原因是無法建立暫存檔案。"
#: ../gtk/gtkprintoperation-unix.c:302
#: ../gtk/gtkprintoperation-unix.c:307
msgid "Error launching preview"
msgstr "執行預覽時發生錯誤"
@@ -3306,7 +3306,7 @@ msgstr "第 %2$d 行第 %3$d 字有非預設的開始標記「%1$s」"
msgid "Unexpected character data on line %d char %d"
msgstr "第 %d 行第 %d 字有非預設的字元資料"
#: ../gtk/gtkuimanager.c:2738
#: ../gtk/gtkuimanager.c:2694
msgid "Empty"
msgstr "空的"

View File

@@ -16,6 +16,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <stdlib.h>
#include <gtk/gtk.h>

View File

@@ -16,8 +16,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include "config.h"
#include <stdlib.h>
#include <gtk/gtk.h>
#define CUSTOM_ITEM "custom-item"