Compare commits

...

30 Commits

Author SHA1 Message Date
39f974358c Check error of g_dbus_proxy_new_sync call
Otherwise errors pile up and we crash later on.
2015-09-24 13:31:07 -04:00
0fb98606ef shell_dbus_acquire_name: Don't leak the result
The GVariant returned by g_dbus_proxy_call_sync must be
freed with g_variant_unref, to prevent a leak.
2015-09-24 13:19:17 -04:00
dd0d5a757c shell_dbus_acquire_name: Don't leak error
If fatal is not set, we return from this function in the error
case. Don't leak the GError if that happens.
2015-09-24 13:19:11 -04:00
0bbb226faf shell_dbus_acquire_name: Don't assume error is set
In rare cases (mostly when the bus connection is going away),
g_dbus_proxy_call_sync can return NULL without setting an error.
Don't crash in this case.
2015-09-24 13:19:04 -04:00
35b38d5cb2 Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2015-09-24 15:16:45 +07:00
09e8a437d4 Update Arabic translation 2015-09-23 23:53:04 +02:00
d2bedcc182 build: Replace deprecated GNOME_COMPILE_WARNINGS macro 2015-09-23 21:32:50 +02:00
84eda6e459 st: Don't avoid parameter list
Meh, C ...
2015-09-23 21:32:50 +02:00
f5e7530fc7 st: Add default case to switch statements 2015-09-23 21:32:50 +02:00
f983b34784 st: Handle all possible enum values in switch statements 2015-09-23 21:32:50 +02:00
36bbe64898 st: Fix constness in assignment 2015-09-23 21:32:50 +02:00
627a393ed6 st: Don't mix declarations and code 2015-09-23 21:32:50 +02:00
a025b151ef st: Don't shadow existing variables 2015-09-23 21:32:50 +02:00
18b6f13395 st: Fix signed-unsigned comparisons 2015-09-23 21:32:50 +02:00
051413550f st: Don't duplicate declarations from G_DEFINE_TYPE 2015-09-23 21:32:50 +02:00
3e10574736 shell: Add default case to switch statements
... to shut up a compiler warning.
2015-09-23 21:32:50 +02:00
9a3041004b shell: Don't shadow existing variables 2015-09-23 21:32:50 +02:00
87f71b8ce1 shell: Don't mix declarations and code 2015-09-23 21:32:50 +02:00
825146f1e3 shell: Fix signed-unsigned comparisons 2015-09-23 21:32:50 +02:00
52995416fd shell: Don't avoid parameter list
Meh, C ...
2015-09-23 21:32:50 +02:00
6c43d0247a main: Fix constness mismatches 2015-09-23 21:32:49 +02:00
9aa98d9f0c menutracker: Don't shadow existing variables 2015-09-23 21:32:49 +02:00
c3a29d6df1 theme-node: Rewrite switch statement
Some compilers warn about unhandled enum values in switch statements,
so don't use one where only two out of 21 possible values make sense.
2015-09-23 21:32:49 +02:00
82f84416a9 recorder: Rewrite switch statement
Avoid compiler warnings about unhandled enum values by using a
regular if-else statement.
2015-09-23 21:32:49 +02:00
9dd3162dbe recorder-src: Rewrite switch statement
Avoid compiler warnings about unhandled enum values by using a
regular if-else statement.
2015-09-23 21:32:49 +02:00
7ef519756a Update gvc submodule 2015-09-23 21:32:49 +02:00
3bbe74d1c1 popupMenu: Set ImageMenuItem's label-actor
While we don't use image menu items ourselves, extensions might,
so make sure they are accessible out of the box.
Spotted by Jay Strict.
2015-09-23 14:20:38 +02:00
409f6718b8 calendar: Disconnect all Notification signals on NotificationMessage destruction
The destroy signal handler is kept connected despite the NotificationMessage
being destroyed, which leaves dangling NotificationMessage objects that will
be mass destroyed when the Notification object these depend upon is finally
destroyed.

Depending on the amount of accumulated NotificationMessages, this may lead
to temporary freezes or other more funky issues when recursion limits are
hit.

https://bugzilla.gnome.org/show_bug.cgi?id=755425
2015-09-22 18:16:16 +02:00
9c0e179080 Updated Serbian Latin translation 2015-09-22 11:49:36 +00:00
b3b278d41f Updated Serbian translation 2015-09-22 11:48:55 +00:00
31 changed files with 1752 additions and 1183 deletions

View File

@ -1,5 +1,6 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.18.0],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AX_IS_RELEASE([git-directory])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shell-global.c])
@ -220,7 +221,7 @@ if test "$enable_man" != no; then
fi
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
GNOME_COMPILE_WARNINGS([error])
AX_COMPILER_FLAGS()
case "$WARN_CFLAGS" in
*-Werror*)
WARN_CFLAGS="$WARN_CFLAGS -Wno-error=deprecated-declarations"
@ -269,7 +270,7 @@ Build configuration:
Prefix: ${prefix}
Source code location: ${srcdir}
Compiler: ${CC}
Compiler Warnings: $enable_compile_warnings
Compiler Warnings: $ax_enable_compile_warnings
Support for NetworkManager: $have_networkmanager
Support for GStreamer recording: $build_recorder

View File

@ -1230,7 +1230,7 @@ const NotificationMessage = new Lang.Class({
this._closed = true;
this.notification.destroy(MessageTray.NotificationDestroyedReason.DISMISSED);
}));
notification.connect('destroy', Lang.bind(this,
this._destroyId = notification.connect('destroy', Lang.bind(this,
function() {
if (!this._closed)
this.close();
@ -1262,6 +1262,10 @@ const NotificationMessage = new Lang.Class({
if (this._updatedId)
this.notification.disconnect(this._updatedId);
this._updatedId = 0;
if (this._destroyId)
this.notification.disconnect(this._destroyId);
this._destroyId = 0;
}
});

View File

@ -396,6 +396,7 @@ const PopupImageMenuItem = new Lang.Class({
this.actor.add_child(this.label);
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
this.actor.add_child(this._icon, { align: St.Align.END });
this.actor.label_actor = this.label;
this.setIcon(iconName);
},

530
po/ar.po

File diff suppressed because it is too large Load Diff

729
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

663
po/vi.po

File diff suppressed because it is too large Load Diff

View File

@ -176,15 +176,15 @@ gtk_menu_tracker_section_sync_separators (GtkMenuTrackerSection *section,
if (subsection)
{
gboolean could_have_separator;
gboolean section_could_have_separator;
could_have_separator = (section->with_separators && n_items > 0) || subsection->separator_label;
section_could_have_separator = (section->with_separators && n_items > 0) || subsection->separator_label;
/* Only pass the parent_model and parent_index in case they may be used to create the separator. */
n_items += gtk_menu_tracker_section_sync_separators (subsection, tracker, offset + n_items,
could_have_separator,
could_have_separator ? section->model : NULL,
could_have_separator ? i : 0);
section_could_have_separator,
section_could_have_separator ? section->model : NULL,
section_could_have_separator ? i : 0);
}
else
n_items++;
@ -197,11 +197,11 @@ gtk_menu_tracker_section_sync_separators (GtkMenuTrackerSection *section,
if (should_have_separator > section->has_separator)
{
/* Add a separator */
GtkMenuTrackerItem *item;
GtkMenuTrackerItem *menuitem;
item = _gtk_menu_tracker_item_new (tracker->observable, parent_model, parent_index, NULL, TRUE);
(* tracker->insert_func) (item, offset, tracker->user_data);
g_object_unref (item);
menuitem = _gtk_menu_tracker_item_new (tracker->observable, parent_model, parent_index, NULL, TRUE);
(* tracker->insert_func) (menuitem, offset, tracker->user_data);
g_object_unref (menuitem);
section->has_separator = TRUE;
}

Submodule src/gvc updated: fac3a900e5...0a79019088

View File

@ -51,11 +51,11 @@ enum {
static int _shell_debug;
static void
shell_dbus_acquire_name (GDBusProxy *bus,
guint32 request_name_flags,
guint32 *request_name_result,
gchar *name,
gboolean fatal)
shell_dbus_acquire_name (GDBusProxy *bus,
guint32 request_name_flags,
guint32 *request_name_result,
const gchar *name,
gboolean fatal)
{
GError *error = NULL;
GVariant *request_name_variant;
@ -68,25 +68,27 @@ shell_dbus_acquire_name (GDBusProxy *bus,
NULL, /* cancellable */
&error)))
{
g_printerr ("failed to acquire %s: %s\n", name, error->message);
g_printerr ("failed to acquire %s: %s\n", name, error ? error->message : "");
g_clear_error (&error);
if (!fatal)
return;
exit (1);
}
g_variant_get (request_name_variant, "(u)", request_name_result);
g_variant_unref (request_name_variant);
}
static void
shell_dbus_acquire_names (GDBusProxy *bus,
guint32 request_name_flags,
gchar *name,
gboolean fatal, ...) G_GNUC_NULL_TERMINATED;
shell_dbus_acquire_names (GDBusProxy *bus,
guint32 request_name_flags,
const gchar *name,
gboolean fatal, ...) G_GNUC_NULL_TERMINATED;
static void
shell_dbus_acquire_names (GDBusProxy *bus,
guint32 request_name_flags,
gchar *name,
gboolean fatal, ...)
shell_dbus_acquire_names (GDBusProxy *bus,
guint32 request_name_flags,
const gchar *name,
gboolean fatal, ...)
{
va_list al;
guint32 request_name_result;
@ -130,6 +132,12 @@ shell_dbus_init (gboolean replace)
NULL, /* cancellable */
&error);
if (!bus)
{
g_printerr ("Failed to get a session bus proxy: %s", error->message);
exit (1);
}
request_name_flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;
if (replace)
request_name_flags |= DBUS_NAME_FLAG_REPLACE_EXISTING;
@ -454,7 +462,7 @@ main (int argc, char **argv)
/* Initialize the global object */
if (session_mode == NULL)
session_mode = is_gdm_mode ? "gdm" : "user";
session_mode = is_gdm_mode ? (char *)"gdm" : (char *)"user";
_shell_global_init ("session-mode", session_mode, NULL);

View File

@ -182,7 +182,7 @@ shell_app_system_finalize (GObject *object)
* Return Value: (transfer none): The global #ShellAppSystem singleton
*/
ShellAppSystem *
shell_app_system_get_default ()
shell_app_system_get_default (void)
{
static ShellAppSystem *instance = NULL;
@ -348,6 +348,9 @@ _shell_app_system_notify_app_state_changed (ShellAppSystem *self,
case SHELL_APP_STATE_STOPPED:
g_hash_table_remove (self->priv->running_apps, app);
break;
default:
g_warn_if_reached();
break;
}
g_signal_emit (self, signals[APP_STATE_CHANGED], 0, app);
}

View File

@ -996,7 +996,7 @@ on_enable_monitoring_key_changed (GSettings *settings,
* Return Value: (transfer none): The global #ShellAppUsage instance
*/
ShellAppUsage *
shell_app_usage_get_default ()
shell_app_usage_get_default (void)
{
static ShellAppUsage *instance;

View File

@ -491,6 +491,9 @@ shell_app_activate_full (ShellApp *app,
case SHELL_APP_STATE_RUNNING:
shell_app_activate_window (app, NULL, timestamp);
break;
default:
g_assert_not_reached();
break;
}
}
@ -699,7 +702,7 @@ static int
shell_app_get_last_user_time (ShellApp *app)
{
GSList *iter;
int last_user_time;
guint32 last_user_time;
last_user_time = 0;
@ -709,7 +712,7 @@ shell_app_get_last_user_time (ShellApp *app)
last_user_time = MAX (last_user_time, meta_window_get_user_time (iter->data));
}
return last_user_time;
return (int)last_user_time;
}
/**

View File

@ -68,7 +68,6 @@ shell_gtk_embed_window_created_cb (MetaDisplay *display,
{
ClutterActor *window_actor =
CLUTTER_ACTOR (meta_window_get_compositor_private (window));
MetaDisplay *display = shell_global_get_display (shell_global_get ());
GCallback remove_cb = G_CALLBACK (shell_gtk_embed_remove_window_actor);
cairo_region_t *empty_region;

View File

@ -125,9 +125,10 @@ on_window_draw (GtkWidget *window,
WindowInfo *info)
{
cairo_rectangle_int_t allocation;
gtk_widget_get_allocation (window, &allocation);
double x_offset, y_offset;
gtk_widget_get_allocation (window, &allocation);
/* We draw an arbitrary pattern of red lines near the border of the
* window to make it more clear than empty windows if something
* is drastrically wrong.

View File

@ -626,7 +626,7 @@ shell_perf_log_collect_statistics (ShellPerfLog *perf_log)
{
gint64 event_time = get_time ();
gint64 collection_time;
int i;
guint i;
if (!perf_log->enabled)
return;
@ -672,6 +672,9 @@ shell_perf_log_collect_statistics (ShellPerfLog *perf_log)
statistic->recorded = TRUE;
}
break;
default:
g_warning ("Unsupported signature in event");
break;
}
}
@ -819,7 +822,7 @@ shell_perf_log_dump_events (ShellPerfLog *perf_log,
GError **error)
{
GString *output;
int i;
guint i;
output = g_string_new (NULL);
g_string_append (output, "[ ");

View File

@ -156,17 +156,17 @@ shell_recorder_src_send_event (GstElement * element, GstEvent * event)
ShellRecorderSrc *src = SHELL_RECORDER_SRC (element);
gboolean res;
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)
{
shell_recorder_src_close (src);
gst_event_unref (event);
res = TRUE;
break;
default:
}
else
{
res = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, send_event, (element,
event), FALSE);
break;
}
}
return res;
}

View File

@ -1182,23 +1182,20 @@ recorder_pipeline_bus_watch (GstBus *bus,
{
RecorderPipeline *pipeline = data;
switch (message->type)
if (message->type == GST_MESSAGE_EOS)
{
case GST_MESSAGE_EOS:
recorder_pipeline_closed (pipeline);
return FALSE; /* remove watch */
case GST_MESSAGE_ERROR:
{
GError *error;
}
else if (message->type == GST_MESSAGE_ERROR)
{
GError *error;
gst_message_parse_error (message, &error, NULL);
g_warning ("Error in recording pipeline: %s\n", error->message);
g_error_free (error);
recorder_pipeline_closed (pipeline);
return FALSE; /* remove watch */
}
default:
break;
gst_message_parse_error (message, &error, NULL);
g_warning ("Error in recording pipeline: %s\n", error->message);
g_error_free (error);
recorder_pipeline_closed (pipeline);
return FALSE; /* remove watch */
}
/* Leave the watch in place */

View File

@ -84,7 +84,7 @@ shell_util_get_transformed_allocation (ClutterActor *actor,
*/
ClutterVertex v[4];
gfloat x_min, x_max, y_min, y_max;
gint i;
guint i;
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
@ -165,7 +165,7 @@ shell_util_format_date (const char *format,
*/
/* Copied from gtkcalendar.c */
int
shell_util_get_week_start ()
shell_util_get_week_start (void)
{
int week_start;
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY

View File

@ -865,7 +865,7 @@ shell_startup_sequence_create_icon (ShellStartupSequence *sequence, guint size)
* Return Value: (transfer none): The global #ShellWindowTracker instance
*/
ShellWindowTracker *
shell_window_tracker_get_default ()
shell_window_tracker_get_default (void)
{
static ShellWindowTracker *instance;

View File

@ -801,9 +801,6 @@ struct _StButtonAccessibleClass
StWidgetAccessibleClass parent_class;
};
static void st_button_accessible_class_init (StButtonAccessibleClass *klass);
static void st_button_accessible_init (StButtonAccessible *button);
/* AtkObject */
static void st_button_accessible_initialize (AtkObject *obj,
gpointer data);

View File

@ -94,8 +94,8 @@ st_drawing_area_paint (ClutterActor *self)
}
if (priv->texture != NULL &&
(width != cogl_texture_get_width (priv->texture) ||
height != cogl_texture_get_height (priv->texture)))
(width != (int)cogl_texture_get_width (priv->texture) ||
height != (int)cogl_texture_get_height (priv->texture)))
{
cogl_object_unref (priv->texture);
priv->texture = NULL;

View File

@ -408,9 +408,6 @@ struct _StLabelAccessibleClass
StWidgetAccessibleClass parent_class;
};
static void st_label_accessible_class_init (StLabelAccessibleClass *klass);
static void st_label_accessible_init (StLabelAccessible *label);
/* AtkObject */
static void st_label_accessible_initialize (AtkObject *obj,
gpointer data);

View File

@ -211,7 +211,7 @@ calculate_gaussian_kernel (gdouble sigma,
{
gdouble *ret, sum;
gdouble exp_divisor;
gint half, i;
guint half, i;
g_return_val_if_fail (sigma > 0, NULL);
@ -383,9 +383,6 @@ _st_create_shadow_pipeline (StShadow *shadow_spec,
if (G_UNLIKELY (shadow_pipeline_template == NULL))
{
CoglContext *ctx =
clutter_backend_get_cogl_context (clutter_get_default_backend ());
shadow_pipeline_template = cogl_pipeline_new (ctx);
/* We set up the pipeline to blend the shadow texture with the combine

View File

@ -450,6 +450,7 @@ adjust_with_direction (StAdjustment *adj,
delta = 1.0;
break;
case CLUTTER_SCROLL_SMOOTH:
default:
g_assert_not_reached ();
break;
}
@ -485,6 +486,9 @@ st_scroll_bar_scroll_event (ClutterActor *actor,
case CLUTTER_SCROLL_RIGHT:
adjust_with_direction (priv->adjustment, event->direction);
break;
default:
g_return_val_if_reached (FALSE);
break;
}
return TRUE;

View File

@ -378,6 +378,9 @@ st_scroll_view_get_preferred_width (ClutterActor *actor,
* but that's not cleanly defined at the moment */
min_width = 0;
break;
default:
g_warn_if_reached();
break;
}
switch (priv->vscrollbar_policy)
@ -396,6 +399,9 @@ st_scroll_view_get_preferred_width (ClutterActor *actor,
*/
account_for_vscrollbar = !priv->overlay_scrollbars;
break;
default:
g_warn_if_reached();
break;
}
if (account_for_vscrollbar)
@ -452,6 +458,9 @@ st_scroll_view_get_preferred_height (ClutterActor *actor,
/* We've requested space for the scrollbar, subtract it back out */
for_width -= sb_width;
break;
default:
g_warn_if_reached();
break;
}
switch (priv->hscrollbar_policy)
@ -470,6 +479,9 @@ st_scroll_view_get_preferred_height (ClutterActor *actor,
*/
account_for_hscrollbar = !priv->overlay_scrollbars;
break;
default:
g_warn_if_reached();
break;
}
clutter_actor_get_preferred_height (priv->child, for_width,
@ -489,6 +501,9 @@ st_scroll_view_get_preferred_height (ClutterActor *actor,
* but that's not cleanly defined at the moment */
min_height = 0;
break;
default:
g_warn_if_reached();
break;
}
if (account_for_hscrollbar)
@ -759,6 +774,9 @@ st_scroll_view_scroll_event (ClutterActor *self,
case CLUTTER_SCROLL_RIGHT:
adjust_with_direction (priv->hadjustment, event->direction);
break;
default:
g_warn_if_reached();
break;
}
return TRUE;

View File

@ -335,6 +335,9 @@ st_theme_node_get_corner_border_widths (StThemeNode *node,
if (border_width_2)
*border_width_2 = node->border_width[ST_SIDE_LEFT];
break;
default:
g_assert_not_reached();
break;
}
}
@ -381,6 +384,9 @@ st_theme_node_lookup_corner (StThemeNode *node,
over (&node->border_color[ST_SIDE_BOTTOM], &corner.color, &corner.border_color_1);
over (&node->border_color[ST_SIDE_LEFT], &corner.color, &corner.border_color_2);
break;
default:
g_assert_not_reached();
break;
}
if (corner.color.alpha == 0 &&
@ -433,6 +439,9 @@ get_background_scale (StThemeNode *node,
else if (node->background_size_h > -1)
*scale_w = node->background_size_h / background_image_height;
break;
default:
g_assert_not_reached();
break;
}
if (*scale_h < 0.0)
*scale_h = *scale_w;
@ -960,7 +969,7 @@ st_theme_node_prerender_background (StThemeNode *node,
gboolean draw_background_image_shadow = FALSE;
gboolean has_visible_outline;
ClutterColor border_color;
int border_width[4];
guint border_width[4];
guint rowstride;
guchar *data;
ClutterActorBox actor_box;
@ -1298,15 +1307,15 @@ st_theme_node_load_border_image (StThemeNode *node)
if (node->border_slices_texture == COGL_INVALID_HANDLE)
{
StBorderImage *border_image;
GFile *file;
int scale_factor;
border_image = st_theme_node_get_border_image (node);
if (border_image == NULL)
goto out;
GFile *file;
file = st_border_image_get_file (border_image);
int scale_factor;
g_object_get (node->context, "scale-factor", &scale_factor, NULL);
node->border_slices_texture = st_texture_cache_load_file_to_cogl_texture (st_texture_cache_get_default (),
@ -1350,12 +1359,12 @@ st_theme_node_load_background_image (StThemeNode *node)
{
GFile *background_image;
StShadow *background_image_shadow_spec;
int scale_factor;
background_image = st_theme_node_get_background_image (node);
if (background_image == NULL)
goto out;
int scale_factor;
g_object_get (node->context, "scale-factor", &scale_factor, NULL);
background_image_shadow_spec = st_theme_node_get_background_image_shadow (node);
@ -1588,10 +1597,10 @@ st_theme_node_paint_borders (StThemeNodePaintState *state,
{
StThemeNode *node = state->node;
float width, height;
int border_width[4];
guint border_width[4];
guint border_radius[4];
int max_border_radius = 0;
int max_width_radius[4];
guint max_border_radius = 0;
guint max_width_radius[4];
int corner_id, side_id;
ClutterColor border_color;
guint8 alpha;
@ -1720,6 +1729,9 @@ st_theme_node_paint_borders (StThemeNodePaintState *state,
max_width_radius[ST_CORNER_BOTTOMLEFT], height,
0, 0.5, 0.5, 1);
break;
default:
g_assert_not_reached();
break;
}
}
}
@ -1814,6 +1826,9 @@ st_theme_node_paint_borders (StThemeNodePaintState *state,
verts[7] = height - border_width[ST_SIDE_BOTTOM];
}
break;
default:
g_assert_not_reached();
break;
}
cogl_rectangles (verts, n_rects);
}

View File

@ -30,10 +30,8 @@
#include "st-theme-context.h"
#include "st-theme-node-private.h"
static void st_theme_node_init (StThemeNode *node);
static void st_theme_node_class_init (StThemeNodeClass *klass);
static void st_theme_node_dispose (GObject *object);
static void st_theme_node_finalize (GObject *object);
static void st_theme_node_finalize (GObject *object);
static const ClutterColor BLACK_COLOR = { 0, 0, 0, 0xff };
static const ClutterColor TRANSPARENT_COLOR = { 0, 0, 0, 0 };
@ -596,6 +594,9 @@ get_color_from_rgba_term (CRTerm *term,
case 3:
a = value;
break;
default:
g_assert_not_reached();
break;
}
arg = arg->next;
@ -840,26 +841,21 @@ st_theme_node_lookup_time (StThemeNode *node,
if (strcmp (decl->property->stryng->str, property_name) == 0)
{
CRTerm *term = decl->value;
int factor = 1;
if (term->type != TERM_NUMBER)
continue;
switch (term->content.num->type)
{
case NUM_TIME_S:
*value = 1000 * term->content.num->val;
result = TRUE;
break;
case NUM_TIME_MS:
*value = term->content.num->val;
result = TRUE;
break;
default:
;
}
if (term->content.num->type != NUM_TIME_S ||
term->content.num->type != NUM_TIME_MS)
continue;
if (result)
break;
if (term->content.num->type == NUM_TIME_S)
factor = 1000;
*value = factor * term->content.num->val;
result = TRUE;
break;
}
}
@ -1109,6 +1105,7 @@ get_length_from_term (StThemeNode *node,
case NUM_FREQ_KHZ:
case NUM_UNKNOWN_TYPE:
case NB_NUM_TYPE:
default:
g_warning ("Ignoring invalid type of number of length property");
return VALUE_NOT_FOUND;
}
@ -3023,7 +3020,7 @@ st_theme_node_get_border_image (StThemeNode *node)
CRStyleSheet *base_stylesheet;
int borders[4];
int n_borders = 0;
int i;
int j;
const char *url;
int border_top;
@ -3053,7 +3050,7 @@ st_theme_node_get_border_image (StThemeNode *node)
/* Followed by 0 to 4 numbers or percentages. *Not lengths*. The interpretation
* of a number is supposed to be pixels if the image is pixel based, otherwise CSS pixels.
*/
for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++)
{
if (term == NULL)
break;
@ -3257,6 +3254,9 @@ parse_shadow_property (StThemeNode *node,
"not allowed");
*spread = value;
break;
default:
g_warning ("Ignoring excess values in shadow definition");
break;
}
continue;
}
@ -3633,6 +3633,9 @@ st_theme_node_get_icon_colors (StThemeNode *node)
case SUCCESS:
node->icon_colors->success = color;
break;
default:
g_assert_not_reached();
break;
}
}
}

View File

@ -615,6 +615,9 @@ additional_selector_matches_style (StTheme *a_this,
if (!pseudo_class_add_sel_matches_style (a_this, cur_add_sel, a_node))
return FALSE;
break;
default:
g_warning ("Unhandled selector type %d", cur_add_sel->type);
return FALSE;
}
}
@ -909,6 +912,10 @@ add_matched_properties (StTheme *a_this,
}
}
break;
case AT_RULE_STMT:
case AT_PAGE_RULE_STMT:
case AT_CHARSET_RULE_STMT:
case AT_FONT_FACE_RULE_STMT:
default:
break;
}

View File

@ -349,7 +349,7 @@ static void
st_widget_finalize (GObject *gobject)
{
StWidgetPrivate *priv = ST_WIDGET (gobject)->priv;
int i;
guint i;
g_free (priv->style_class);
g_free (priv->pseudo_class);
@ -623,9 +623,9 @@ st_widget_get_theme_node (StWidget *widget)
* requiring separate style sheets.
*/
if (clutter_actor_get_text_direction (CLUTTER_ACTOR (widget)) == CLUTTER_TEXT_DIRECTION_RTL)
direction_pseudo_class = "rtl";
direction_pseudo_class = (char *)"rtl";
else
direction_pseudo_class = "ltr";
direction_pseudo_class = (char *)"ltr";
if (priv->pseudo_class)
pseudo_class = g_strconcat(priv->pseudo_class, " ",
@ -1495,7 +1495,7 @@ static void
st_widget_init (StWidget *actor)
{
StWidgetPrivate *priv;
int i;
guint i;
actor->priv = priv = ST_WIDGET_GET_PRIVATE (actor);
priv->transition_animation = NULL;
@ -1849,6 +1849,8 @@ filter_by_position (GList *children,
continue;
break;
case GTK_DIR_TAB_BACKWARD:
case GTK_DIR_TAB_FORWARD:
default:
g_return_val_if_reached (NULL);
}
@ -2014,6 +2016,8 @@ st_widget_real_navigate_focus (StWidget *widget,
case GTK_DIR_RIGHT:
sort_box.x2 = sort_box.x1;
break;
case GTK_DIR_TAB_FORWARD:
case GTK_DIR_TAB_BACKWARD:
default:
g_warn_if_reached ();
}
@ -2210,7 +2214,7 @@ st_set_slow_down_factor (gfloat factor)
* Returns: the global factor applied to all animation durations
*/
gfloat
st_get_slow_down_factor ()
st_get_slow_down_factor (void)
{
return st_slow_down_factor;
}
@ -2430,8 +2434,6 @@ st_widget_remove_accessible_state (StWidget *widget,
/* GObject */
static void st_widget_accessible_class_init (StWidgetAccessibleClass *klass);
static void st_widget_accessible_init (StWidgetAccessible *widget);
static void st_widget_accessible_dispose (GObject *gobject);
/* AtkObject */

View File

@ -107,8 +107,10 @@ assert_foreground_color (StThemeNode *node,
guint32 expected)
{
ClutterColor color;
guint32 value;
st_theme_node_get_foreground_color (node, &color);
guint32 value = clutter_color_to_pixel (&color);
value = clutter_color_to_pixel (&color);
if (expected != value)
{
@ -124,8 +126,10 @@ assert_background_color (StThemeNode *node,
guint32 expected)
{
ClutterColor color;
guint32 value;
st_theme_node_get_background_color (node, &color);
guint32 value = clutter_color_to_pixel (&color);
value = clutter_color_to_pixel (&color);
if (expected != value)
{
@ -148,9 +152,9 @@ side_to_string (StSide side)
return "bottom";
case ST_SIDE_LEFT:
return "left";
default:
return "<unknown>";
}
return "<unknown>";
}
static void
@ -160,8 +164,10 @@ assert_border_color (StThemeNode *node,
guint32 expected)
{
ClutterColor color;
guint32 value;
st_theme_node_get_border_color (node, side, &color);
guint32 value = clutter_color_to_pixel (&color);
value = clutter_color_to_pixel (&color);
if (expected != value)
{