summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--capplets/about-me/fingerprint-strings.h6
-rw-r--r--capplets/appearance/appearance-font.c2
-rw-r--r--capplets/appearance/appearance-style.c6
-rw-r--r--capplets/common/activate-settings-daemon.c4
-rw-r--r--capplets/common/gtkrc-utils.c6
-rw-r--r--capplets/common/mate-theme-apply.c2
-rw-r--r--capplets/default-applications/mate-da-capplet.c26
-rw-r--r--capplets/display/scrollarea.c190
-rw-r--r--capplets/display/xrandr-capplet.c4
-rw-r--r--capplets/keybindings/mate-keybinding-properties.c6
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkblt.c2
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkbltadd.c2
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkbot.c2
-rw-r--r--capplets/mouse/mate-mouse-properties.c8
-rw-r--r--capplets/time-admin/src/main.c142
-rw-r--r--capplets/time-admin/src/time-map.c36
-rw-r--r--capplets/time-admin/src/time-map.h6
-rw-r--r--capplets/time-admin/src/time-share.c20
-rw-r--r--capplets/time-admin/src/time-share.h6
-rw-r--r--capplets/time-admin/src/time-tool.c68
-rw-r--r--capplets/time-admin/src/time-tool.h2
-rw-r--r--capplets/time-admin/src/time-zone.c88
-rw-r--r--capplets/time-admin/src/time-zone.h8
-rw-r--r--font-viewer/font-model.c6
-rw-r--r--font-viewer/font-thumbnailer.c2
-rw-r--r--font-viewer/font-view.c18
-rw-r--r--font-viewer/gd-main-toolbar.c8
-rw-r--r--font-viewer/gd-main-toolbar.h6
-rw-r--r--font-viewer/sushi-font-widget.c6
-rw-r--r--font-viewer/totem-resources.c2
-rw-r--r--font-viewer/totem-resources.h2
-rw-r--r--libslab/application-tile.c2
-rw-r--r--libslab/bookmark-agent.c14
-rw-r--r--libslab/nameplate-tile.c2
-rw-r--r--libwindow-settings/marco-window-manager.c48
-rw-r--r--libwindow-settings/mate-window-manager.c30
-rw-r--r--typing-break/drw-monitor.c24
-rw-r--r--typing-break/drw-selection.h2
-rw-r--r--typing-break/drw-timer.c8
-rw-r--r--typing-break/drw-utils.c6
-rw-r--r--typing-break/main.c12
41 files changed, 420 insertions, 420 deletions
diff --git a/capplets/about-me/fingerprint-strings.h b/capplets/about-me/fingerprint-strings.h
index 20446a0b..fa7211d6 100644
--- a/capplets/about-me/fingerprint-strings.h
+++ b/capplets/about-me/fingerprint-strings.h
@@ -1,7 +1,7 @@
/*
* Helper functions to translate statuses and actions to strings
* Copyright (C) 2008 Bastien Nocera <[email protected]>
- *
+ *
* Experimental code. This will be moved out of fprintd into it's own
* package once the system has matured.
*
@@ -9,12 +9,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
diff --git a/capplets/appearance/appearance-font.c b/capplets/appearance/appearance-font.c
index f4dd0d4d..32ba202c 100644
--- a/capplets/appearance/appearance-font.c
+++ b/capplets/appearance/appearance-font.c
@@ -98,7 +98,7 @@ static void set_fontoptions(PangoContext *context, Antialiasing antialiasing, Hi
cairo_font_options_t *opt;
cairo_antialias_t aa;
cairo_hint_style_t hs;
-
+
switch (antialiasing) {
case ANTIALIAS_NONE:
aa = CAIRO_ANTIALIAS_NONE;
diff --git a/capplets/appearance/appearance-style.c b/capplets/appearance/appearance-style.c
index d036c467..cfe35941 100644
--- a/capplets/appearance/appearance-style.c
+++ b/capplets/appearance/appearance-style.c
@@ -949,12 +949,12 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
conv_data = g_new (ThemeConvData, 1);
conv_data->data = data;
conv_data->thumbnail = thumbnail;
-
+
/* set useful data for callbacks */
g_object_set_data_full (G_OBJECT (list), THEME_DATA, conv_data, g_free);
g_object_set_data (G_OBJECT (list), GSETTINGS_SETTINGS, settings);
g_object_set_data_full (G_OBJECT (list), GSETTINGS_KEY, g_strdup(key), g_free);
-
+
/* select in treeview the theme set in gsettings */
GtkTreeModel *treemodel;
treemodel = gtk_tree_view_get_model (GTK_TREE_VIEW (list));
@@ -971,7 +971,7 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
}
if (theme)
g_free (theme);
-
+
/* connect to gsettings change event */
gchar *signal_name = g_strdup_printf("changed::%s", key);
g_signal_connect (settings, signal_name,
diff --git a/capplets/common/activate-settings-daemon.c b/capplets/common/activate-settings-daemon.c
index f82f0353..21fd2b2b 100644
--- a/capplets/common/activate-settings-daemon.c
+++ b/capplets/common/activate-settings-daemon.c
@@ -23,7 +23,7 @@ static void popup_error_message (void)
}
/* Returns FALSE if activation failed, else TRUE */
-gboolean
+gboolean
activate_settings_daemon (void)
{
DBusGConnection *connection = NULL;
@@ -37,7 +37,7 @@ activate_settings_daemon (void)
g_error_free (error);
return FALSE;
}
-
+
proxy = dbus_g_proxy_new_for_name (connection,
"org.mate.SettingsDaemon",
"/org/mate/SettingsDaemon",
diff --git a/capplets/common/gtkrc-utils.c b/capplets/common/gtkrc-utils.c
index b3f0c785..011c8a11 100644
--- a/capplets/common/gtkrc-utils.c
+++ b/capplets/common/gtkrc-utils.c
@@ -46,11 +46,11 @@ gchar* gtkrc_find_named(const gchar* name)
/* First look in the users home directory
*/
home_dir = g_get_home_dir();
-
+
if (home_dir)
{
path = g_build_filename(home_dir, ".themes", name, subpath, NULL);
-
+
if (!g_file_test (path, G_FILE_TEST_EXISTS))
{
g_free (path);
@@ -91,7 +91,7 @@ void gtkrc_get_details(gchar* filename, GSList** engines, GSList** symbolic_colo
}
files = g_slist_prepend (files, g_strdup (filename));
-
+
while (files != NULL)
{
filename = files->data;
diff --git a/capplets/common/mate-theme-apply.c b/capplets/common/mate-theme-apply.c
index 6f0cc09e..f1de6bd9 100644
--- a/capplets/common/mate-theme-apply.c
+++ b/capplets/common/mate-theme-apply.c
@@ -58,7 +58,7 @@ mate_meta_theme_set (MateThemeMetaInfo *meta_theme_info)
interface_settings = g_settings_new (INTERFACE_SCHEMA);
marco_settings = g_settings_new (MARCO_SCHEMA);
mouse_settings = g_settings_new (MOUSE_SCHEMA);
-
+
if (mate_gsettings_schema_exists (NOTIFICATION_SCHEMA))
{
notification_settings = g_settings_new (NOTIFICATION_SCHEMA);
diff --git a/capplets/default-applications/mate-da-capplet.c b/capplets/default-applications/mate-da-capplet.c
index 386765b2..11a57809 100644
--- a/capplets/default-applications/mate-da-capplet.c
+++ b/capplets/default-applications/mate-da-capplet.c
@@ -73,7 +73,7 @@ set_changed(GtkComboBox* combo, MateDACapplet* capplet, GList* list, gint type)
if (index < g_list_length(list))
{
item = (GAppInfo*) g_list_nth_data(list, index);
-
+
switch (type)
{
case DA_TYPE_WEB_BROWSER:
@@ -89,11 +89,11 @@ set_changed(GtkComboBox* combo, MateDACapplet* capplet, GList* list, gint type)
g_app_info_set_as_default_for_type(item, "application/x-extension-eml", NULL);
g_app_info_set_as_default_for_type(item, "message/rfc822", NULL);
break;
-
+
case DA_TYPE_FILE:
g_app_info_set_as_default_for_type(item, "inode/directory", NULL);
break;
-
+
case DA_TYPE_TEXT:
g_app_info_set_as_default_for_type(item, "text/plain", NULL);
break;
@@ -105,7 +105,7 @@ set_changed(GtkComboBox* combo, MateDACapplet* capplet, GList* list, gint type)
g_app_info_set_as_default_for_type(item, "audio/x-vorbis+ogg", NULL);
g_app_info_set_as_default_for_type(item, "audio/x-wav", NULL);
break;
-
+
case DA_TYPE_VIDEO:
g_app_info_set_as_default_for_type(item, "video/mp4", NULL);
g_app_info_set_as_default_for_type(item, "video/mpeg", NULL);
@@ -311,7 +311,7 @@ refresh_combo_box_icons(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_
return;
valid = gtk_tree_model_get_iter_first(model, &iter);
-
+
while (valid)
{
gtk_tree_model_get(model, &iter,
@@ -329,7 +329,7 @@ refresh_combo_box_icons(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_
{
g_object_unref(pixbuf);
}
-
+
g_free(icon_name);
valid = gtk_tree_model_iter_next(model, &iter);
@@ -372,7 +372,7 @@ theme_changed_cb(GtkIconTheme* theme, MateDACapplet* capplet)
GdkPixbuf* pixbuf = gtk_icon_info_load_icon(icon_info, NULL);
gtk_image_set_from_pixbuf(GTK_IMAGE(icon), pixbuf);
-
+
if (pixbuf)
{
g_object_unref(pixbuf);
@@ -532,7 +532,7 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
for (entry = app_list; entry != NULL; entry = g_list_next(entry))
{
GAppInfo* item = (GAppInfo*) entry->data;
-
+
/* Icon */
GIcon* icon = g_app_info_get_icon(item);
gchar* icon_name;
@@ -546,7 +546,7 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
} else {
icon_name = g_strdup ("binary");
}
-
+
GtkIconInfo* icon_info = gtk_icon_theme_lookup_icon (theme, icon_name, 22, GTK_ICON_LOOKUP_FORCE_SIZE);
pixbuf = gtk_icon_info_load_icon(icon_info, NULL);
@@ -562,15 +562,15 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
{
g_object_unref(pixbuf);
}
-
+
/* Set the index for the default app */
if (default_app != NULL && g_app_info_equal(item, default_app))
{
gtk_combo_box_set_active(combo_box, index);
}
-
+
g_free(icon_name);
-
+
index++;
}
}
@@ -786,7 +786,7 @@ show_dialog(MateDACapplet* capplet, const gchar* start_page)
nb = GTK_NOTEBOOK(get_widget("preferred_apps_notebook"));
pindex = gtk_notebook_page_num(nb, w);
-
+
if (pindex != -1)
{
gtk_notebook_set_current_page(nb, pindex);
diff --git a/capplets/display/scrollarea.c b/capplets/display/scrollarea.c
index 89bf6b39..01961443 100644
--- a/capplets/display/scrollarea.c
+++ b/capplets/display/scrollarea.c
@@ -67,10 +67,10 @@ struct AutoScrollInfo
struct FooScrollAreaPrivate
{
GdkWindow *input_window;
-
+
int width;
int height;
-
+
GtkAdjustment *hadj;
GtkAdjustment *vadj;
@@ -79,16 +79,16 @@ struct FooScrollAreaPrivate
int x_offset;
int y_offset;
-
+
int min_width;
int min_height;
GPtrArray *input_regions;
-
+
AutoScrollInfo *auto_scroll_info;
-
+
InputRegion *current_input;
-
+
gboolean grabbed;
FooScrollAreaEventFunc grab_func;
gpointer grab_data;
@@ -144,9 +144,9 @@ static void
foo_scroll_area_map (GtkWidget *widget)
{
FooScrollArea *area = FOO_SCROLL_AREA (widget);
-
+
GTK_WIDGET_CLASS (parent_class)->map (widget);
-
+
if (area->priv->input_window)
gdk_window_show (area->priv->input_window);
}
@@ -155,10 +155,10 @@ static void
foo_scroll_area_unmap (GtkWidget *widget)
{
FooScrollArea *area = FOO_SCROLL_AREA (widget);
-
+
if (area->priv->input_window)
gdk_window_hide (area->priv->input_window);
-
+
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
}
@@ -166,12 +166,12 @@ static void
foo_scroll_area_finalize (GObject *object)
{
FooScrollArea *scroll_area = FOO_SCROLL_AREA (object);
-
+
g_object_unref (scroll_area->priv->hadj);
g_object_unref (scroll_area->priv->vadj);
-
+
g_ptr_array_free (scroll_area->priv->input_regions, TRUE);
-
+
g_free (scroll_area->priv);
G_OBJECT_CLASS (foo_scroll_area_parent_class)->finalize (object);
@@ -234,7 +234,7 @@ foo_scroll_area_class_init (FooScrollAreaClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
-
+
object_class->finalize = foo_scroll_area_finalize;
object_class->set_property = foo_scroll_area_set_property;
object_class->get_property = foo_scroll_area_get_property;
@@ -271,7 +271,7 @@ foo_scroll_area_class_init (FooScrollAreaClass *class)
G_TYPE_NONE, 2,
GDK_TYPE_RECTANGLE,
GDK_TYPE_RECTANGLE);
-
+
signals[PAINT] =
g_signal_new ("paint",
G_OBJECT_CLASS_TYPE (object_class),
@@ -300,7 +300,7 @@ foo_scroll_area_init (FooScrollArea *scroll_area)
gtk_widget_set_has_window (widget, FALSE);
gtk_widget_set_redraw_on_allocate (widget, FALSE);
-
+
scroll_area->priv = g_new0 (FooScrollAreaPrivate, 1);
scroll_area->priv->width = 0;
scroll_area->priv->height = 0;
@@ -326,24 +326,24 @@ path_foreach_point (cairo_path_t *path,
gpointer user_data)
{
int i;
-
+
for (i = 0; i < path->num_data; i += path->data[i].header.length)
{
cairo_path_data_t *data = &(path->data[i]);
-
+
switch (data->header.type)
{
case CAIRO_PATH_MOVE_TO:
case CAIRO_PATH_LINE_TO:
func (&(data[1].point.x), &(data[1].point.y), user_data);
break;
-
+
case CAIRO_PATH_CURVE_TO:
func (&(data[1].point.x), &(data[1].point.y), user_data);
func (&(data[2].point.x), &(data[2].point.y), user_data);
func (&(data[3].point.x), &(data[3].point.y), user_data);
break;
-
+
case CAIRO_PATH_CLOSE_PATH:
break;
}
@@ -413,7 +413,7 @@ clear_exposed_input_region (FooScrollArea *area,
allocation_to_canvas (area, &allocation.x, &allocation.y);
viewport = cairo_region_create_rectangle (&allocation);
cairo_region_subtract (viewport, exposed);
-
+
for (i = 0; i < area->priv->input_regions->len; ++i)
{
InputRegion *region = area->priv->input_regions->pdata[i];
@@ -511,10 +511,10 @@ foo_scroll_area_get_viewport (FooScrollArea *scroll_area,
GdkRectangle *viewport)
{
g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
-
+
if (!viewport)
return;
-
+
get_viewport (scroll_area, viewport);
}
@@ -534,7 +534,7 @@ emit_viewport_changed (FooScrollArea *scroll_area,
GdkDevice *pointer;
int px, py;
- g_signal_emit (scroll_area, signals[VIEWPORT_CHANGED], 0,
+ g_signal_emit (scroll_area, signals[VIEWPORT_CHANGED], 0,
new_viewport, old_viewport);
if (scroll_area->priv->input_window == NULL)
@@ -548,7 +548,7 @@ emit_viewport_changed (FooScrollArea *scroll_area,
&px,
&py,
NULL);
-
+
process_event (scroll_area, FOO_MOTION, px, py);
}
@@ -570,7 +570,7 @@ set_adjustment_values (FooScrollArea *scroll_area)
GtkAdjustment *hadj = scroll_area->priv->hadj;
GtkAdjustment *vadj = scroll_area->priv->vadj;
-
+
/* Horizontal */
gtk_widget_get_allocation (GTK_WIDGET (scroll_area), &allocation);
g_object_freeze_notify (G_OBJECT (hadj));
@@ -580,7 +580,7 @@ set_adjustment_values (FooScrollArea *scroll_area)
gtk_adjustment_set_lower (hadj, 0.0);
gtk_adjustment_set_upper (hadj, scroll_area->priv->width);
g_object_thaw_notify (G_OBJECT (hadj));
-
+
/* Vertical */
g_object_freeze_notify (G_OBJECT (vadj));
gtk_adjustment_set_page_size (vadj, allocation.height);
@@ -592,7 +592,7 @@ set_adjustment_values (FooScrollArea *scroll_area)
clamp_adjustment (hadj);
clamp_adjustment (vadj);
-
+
return TRUE;
}
@@ -608,7 +608,7 @@ foo_scroll_area_realize (GtkWidget *widget)
gtk_widget_get_allocation (widget, &widget_allocation);
gtk_widget_set_realized (widget, TRUE);
-
+
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget_allocation.x;
attributes.y = widget_allocation.y;
@@ -624,13 +624,13 @@ foo_scroll_area_realize (GtkWidget *widget)
GDK_POINTER_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK);
-
+
attributes_mask = GDK_WA_X | GDK_WA_Y;
window = gtk_widget_get_parent_window (widget);
gtk_widget_set_window (widget, window);
g_object_ref (window);
-
+
area->priv->input_window = gdk_window_new (window,
&attributes, attributes_mask);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
@@ -639,7 +639,7 @@ foo_scroll_area_realize (GtkWidget *widget)
cairo_destroy (cr);
gdk_window_set_user_data (area->priv->input_window, area);
-
+
gtk_widget_style_attach (widget);
}
@@ -647,14 +647,14 @@ static void
foo_scroll_area_unrealize (GtkWidget *widget)
{
FooScrollArea *area = FOO_SCROLL_AREA (widget);
-
+
if (area->priv->input_window)
{
gdk_window_set_user_data (area->priv->input_window, NULL);
gdk_window_destroy (area->priv->input_window);
area->priv->input_window = NULL;
}
-
+
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
@@ -692,7 +692,7 @@ create_new_surface (GtkWidget *widget,
return new;
}
-
+
static void
allocation_to_canvas_region (FooScrollArea *area,
cairo_region_t *region)
@@ -739,7 +739,7 @@ foo_scroll_area_size_allocate (GtkWidget *widget,
cairo_region_destroy (invalid);
gtk_widget_set_allocation (widget, allocation);
-
+
if (scroll_area->priv->input_window)
{
cairo_surface_t *new_surface;
@@ -752,9 +752,9 @@ foo_scroll_area_size_allocate (GtkWidget *widget,
cairo_surface_destroy (scroll_area->priv->surface);
scroll_area->priv->surface = new_surface;
}
-
+
get_viewport (scroll_area, &new_viewport);
-
+
emit_viewport_changed (scroll_area, &new_viewport, &old_viewport);
}
@@ -767,17 +767,17 @@ emit_input (FooScrollArea *scroll_area,
gpointer data)
{
FooScrollAreaEvent event;
-
+
if (!func)
return;
if (type != FOO_MOTION)
emit_input (scroll_area, FOO_MOTION, x, y, func, data);
-
+
event.type = type;
event.x = x;
event.y = y;
-
+
func (scroll_area, &event, data);
}
@@ -791,7 +791,7 @@ process_event (FooScrollArea *scroll_area,
int i;
allocation_to_canvas (scroll_area, &x, &y);
-
+
if (scroll_area->priv->grabbed)
{
emit_input (scroll_area, input_type, x, y,
@@ -825,7 +825,7 @@ process_event (FooScrollArea *scroll_area,
inside = cairo_in_fill (cr, x, y);
cairo_destroy (cr);
-
+
if (inside)
{
emit_input (scroll_area, input_type,
@@ -834,7 +834,7 @@ process_event (FooScrollArea *scroll_area,
path->data);
return;
}
-
+
path = path->next;
}
@@ -855,7 +855,7 @@ process_gdk_event (FooScrollArea *scroll_area,
GdkEvent *event)
{
FooScrollAreaEventType input_type;
-
+
if (event->type == GDK_BUTTON_PRESS)
input_type = FOO_BUTTON_PRESS;
else if (event->type == GDK_BUTTON_RELEASE)
@@ -864,7 +864,7 @@ process_gdk_event (FooScrollArea *scroll_area,
input_type = FOO_MOTION;
else
return;
-
+
process_event (scroll_area, input_type, x, y);
}
@@ -873,9 +873,9 @@ foo_scroll_area_button_press (GtkWidget *widget,
GdkEventButton *event)
{
FooScrollArea *area = FOO_SCROLL_AREA (widget);
-
+
process_gdk_event (area, event->x, event->y, (GdkEvent *)event);
-
+
return TRUE;
}
@@ -884,9 +884,9 @@ foo_scroll_area_button_release (GtkWidget *widget,
GdkEventButton *event)
{
FooScrollArea *area = FOO_SCROLL_AREA (widget);
-
+
process_gdk_event (area, event->x, event->y, (GdkEvent *)event);
-
+
return FALSE;
}
@@ -895,7 +895,7 @@ foo_scroll_area_motion (GtkWidget *widget,
GdkEventMotion *event)
{
FooScrollArea *area = FOO_SCROLL_AREA (widget);
-
+
process_gdk_event (area, event->x, event->y, (GdkEvent *)event);
return TRUE;
}
@@ -912,7 +912,7 @@ foo_scroll_area_set_size_fixed_y (FooScrollArea *scroll_area,
g_object_thaw_notify (G_OBJECT (scroll_area->priv->vadj));
gtk_adjustment_set_value (scroll_area->priv->vadj, new_y);
-
+
set_adjustment_values (scroll_area);
g_object_thaw_notify (G_OBJECT (scroll_area->priv->vadj));
}
@@ -923,7 +923,7 @@ foo_scroll_area_set_size (FooScrollArea *scroll_area,
int height)
{
g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
-
+
/* FIXME: Default scroll algorithm should probably be to
* keep the same *area* outside the screen as before.
*
@@ -935,13 +935,13 @@ foo_scroll_area_set_size (FooScrollArea *scroll_area,
* Maybe there should be some generic support for those
* widgets. Can that even be done?
*
- * Should we have a version of this function using
+ * Should we have a version of this function using
* fixed points?
*/
-
+
scroll_area->priv->width = width;
scroll_area->priv->height = height;
-
+
set_adjustment_values (scroll_area);
}
@@ -977,7 +977,7 @@ foo_scroll_area_get_preferred_height (GtkWidget *widget,
static void
foo_scroll_area_scroll (FooScrollArea *area,
- gint dx,
+ gint dx,
gint dy)
{
GdkRectangle allocation;
@@ -994,7 +994,7 @@ foo_scroll_area_scroll (FooScrollArea *area,
src_area.y -= dy;
invalid_region = cairo_region_create_rectangle (&allocation);
-
+
if (gdk_rectangle_intersect (&allocation, &src_area, &move_area))
{
cairo_region_t *move_region;
@@ -1020,17 +1020,17 @@ foo_scroll_area_scroll (FooScrollArea *area,
cairo_destroy (cr);
gtk_widget_queue_draw (GTK_WIDGET (area));
-
+
move_region = cairo_region_create_rectangle (&move_area);
cairo_region_translate (move_region, dx, dy);
cairo_region_subtract (invalid_region, move_region);
cairo_region_destroy (move_region);
}
-
+
allocation_to_canvas_region (area, invalid_region);
foo_scroll_area_invalidate_region (area, invalid_region);
-
+
cairo_region_destroy (invalid_region);
}
@@ -1042,9 +1042,9 @@ foo_scrollbar_adjustment_changed (GtkAdjustment *adj,
gint dx = 0;
gint dy = 0;
GdkRectangle old_viewport, new_viewport;
-
+
get_viewport (scroll_area, &old_viewport);
-
+
if (adj == scroll_area->priv->hadj)
{
/* FIXME: do we treat the offset as int or double, and,
@@ -1062,14 +1062,14 @@ foo_scrollbar_adjustment_changed (GtkAdjustment *adj,
{
g_assert_not_reached ();
}
-
+
if (gtk_widget_get_realized (widget))
{
foo_scroll_area_scroll (scroll_area, -dx, -dy);
}
-
+
get_viewport (scroll_area, &new_viewport);
-
+
emit_viewport_changed (scroll_area, &new_viewport, &old_viewport);
}
@@ -1079,27 +1079,27 @@ set_one_adjustment (FooScrollArea *scroll_area,
GtkAdjustment **location)
{
g_return_if_fail (location != NULL);
-
+
if (adjustment == *location)
return;
-
+
if (!adjustment)
adjustment = new_adjustment ();
-
+
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
-
+
if (*location)
{
g_signal_handlers_disconnect_by_func (
*location, foo_scrollbar_adjustment_changed, scroll_area);
-
+
g_object_unref (*location);
}
-
+
*location = adjustment;
-
+
g_object_ref_sink (*location);
-
+
g_signal_connect (*location, "value_changed",
G_CALLBACK (foo_scrollbar_adjustment_changed),
scroll_area);
@@ -1136,7 +1136,7 @@ foo_scroll_area_set_min_size (FooScrollArea *scroll_area,
{
scroll_area->priv->min_width = min_width;
scroll_area->priv->min_height = min_height;
-
+
/* FIXME: think through invalidation.
*
* Goals: - no repainting everything on size_allocate(),
@@ -1151,7 +1151,7 @@ user_to_device (double *x, double *y,
gpointer data)
{
cairo_t *cr = data;
-
+
cairo_user_to_device (cr, x, y);
}
@@ -1228,7 +1228,7 @@ canvas_to_window (FooScrollArea *area,
{
GtkAllocation allocation;
GtkWidget *widget = GTK_WIDGET (area);
-
+
gtk_widget_get_allocation (widget, &allocation);
cairo_region_translate (region,
-area->priv->x_offset + allocation.x,
@@ -1263,10 +1263,10 @@ foo_scroll_area_invalidate_region (FooScrollArea *area,
if (gtk_widget_get_realized (widget))
{
canvas_to_window (area, region);
-
+
gdk_window_invalidate_region (gtk_widget_get_window (widget),
region, TRUE);
-
+
window_to_canvas (area, region);
}
}
@@ -1280,7 +1280,7 @@ foo_scroll_area_invalidate_rect (FooScrollArea *scroll_area,
{
GdkRectangle rect = { x, y, width, height };
cairo_region_t *region;
-
+
g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
region = cairo_region_create_rectangle (&rect);
@@ -1297,11 +1297,11 @@ foo_scroll_area_begin_grab (FooScrollArea *scroll_area,
{
g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
g_return_if_fail (!scroll_area->priv->grabbed);
-
+
scroll_area->priv->grabbed = TRUE;
scroll_area->priv->grab_func = func;
scroll_area->priv->grab_data = input_data;
-
+
/* FIXME: we should probably take a server grab */
/* Also, maybe there should be support for setting the grab cursor */
}
@@ -1310,7 +1310,7 @@ void
foo_scroll_area_end_grab (FooScrollArea *scroll_area)
{
g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
-
+
scroll_area->priv->grabbed = FALSE;
scroll_area->priv->grab_func = NULL;
scroll_area->priv->grab_data = NULL;
@@ -1354,7 +1354,7 @@ stop_scrolling (FooScrollArea *area)
g_source_remove (area->priv->auto_scroll_info->timeout_id);
g_timer_destroy (area->priv->auto_scroll_info->timer);
g_free (area->priv->auto_scroll_info);
-
+
area->priv->auto_scroll_info = NULL;
}
}
@@ -1367,14 +1367,14 @@ scroll_idle (gpointer data)
AutoScrollInfo *info = area->priv->auto_scroll_info;
int new_x, new_y;
double elapsed;
-
+
get_viewport (area, &viewport);
elapsed = g_timer_elapsed (info->timer, NULL);
info->res_x = elapsed * info->dx / 0.2;
info->res_y = elapsed * info->dy / 0.2;
-
+
new_x = viewport.x + info->res_x;
new_y = viewport.y + info->res_y;
@@ -1390,11 +1390,11 @@ scroll_idle (gpointer data)
info->res_y < -1.0))
{
stop_scrolling (area);
-
+
/* stop scrolling if it didn't have an effect */
return FALSE;
}
-
+
return TRUE;
}
@@ -1410,7 +1410,7 @@ ensure_scrolling (FooScrollArea *area,
g_idle_add (scroll_idle, area);
area->priv->auto_scroll_info->timer = g_timer_new ();
}
-
+
area->priv->auto_scroll_info->dx = dx;
area->priv->auto_scroll_info->dy = dy;
}
@@ -1420,9 +1420,9 @@ foo_scroll_area_auto_scroll (FooScrollArea *scroll_area,
FooScrollAreaEvent *event)
{
GdkRectangle viewport;
-
+
get_viewport (scroll_area, &viewport);
-
+
if (rect_contains (&viewport, event->x, event->y))
{
stop_scrolling (scroll_area);
@@ -1430,9 +1430,9 @@ foo_scroll_area_auto_scroll (FooScrollArea *scroll_area,
else
{
int dx, dy;
-
+
dx = dy = 0;
-
+
if (event->y < viewport.y)
{
dy = event->y - viewport.y;
@@ -1443,7 +1443,7 @@ foo_scroll_area_auto_scroll (FooScrollArea *scroll_area,
dy = event->y - (viewport.y + viewport.height - 1);
dy = MAX (dy - 2, 0);
}
-
+
if (event->x < viewport.x)
{
dx = event->x - viewport.x;
@@ -1454,7 +1454,7 @@ foo_scroll_area_auto_scroll (FooScrollArea *scroll_area,
dx = event->x - (viewport.x + viewport.width - 1);
dx = MAX (dx - 2, 0);
}
-
+
ensure_scrolling (scroll_area, dx, dy);
}
}
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index bf498cf6..3dddb784 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -58,7 +58,7 @@ struct App
GtkWidget *panel_checkbox;
GtkWidget *clone_checkbox;
GtkWidget *show_icon_checkbox;
- GtkWidget *primary_button;
+ GtkWidget *primary_button;
/* We store the event timestamp when the Apply button is clicked */
GtkWidget *apply_button;
@@ -1628,7 +1628,7 @@ get_display_name (App *app,
* translation could be "Pantallas en Espejo", *not* "Espejar Pantallas".
*/
text = g_strdup_printf (_("Mirror Screens"));
- }
+ }
else {
text = g_strdup_printf ("<b>%s</b>\n<small>%s</small>", mate_rr_output_info_get_display_name (output), mate_rr_output_info_get_name (output));
}
diff --git a/capplets/keybindings/mate-keybinding-properties.c b/capplets/keybindings/mate-keybinding-properties.c
index 3a8eefc2..9504af77 100644
--- a/capplets/keybindings/mate-keybinding-properties.c
+++ b/capplets/keybindings/mate-keybinding-properties.c
@@ -1113,7 +1113,7 @@ static gboolean cb_check_for_uniqueness(GtkTreeModel* model, GtkTreePath* path,
{
return FALSE;
}
-
+
gchar *new_key_schema = NULL;
gchar *element_schema = NULL;
gchar *new_key_path = NULL;
@@ -1124,7 +1124,7 @@ static gboolean cb_check_for_uniqueness(GtkTreeModel* model, GtkTreePath* path,
g_object_get (new_key->settings, "schema-id", &new_key_schema, NULL);
g_object_get (new_key->settings, "path", &new_key_path, NULL);
}
-
+
if (element->settings)
{
g_object_get (element->settings, "schema-id", &element_schema, NULL);
@@ -1656,7 +1656,7 @@ add_custom_shortcut (GtkTreeView *tree_view,
}
else
{
- g_free (key_entry->gsettings_path);
+ g_free (key_entry->gsettings_path);
g_free (key_entry->gsettings_key);
g_free (key_entry->description);
g_free (key_entry->desc_gsettings_key);
diff --git a/capplets/keyboard/mate-keyboard-properties-xkblt.c b/capplets/keyboard/mate-keyboard-properties-xkblt.c
index 115ffac0..b5ee38e7 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkblt.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkblt.c
@@ -102,7 +102,7 @@ xkb_layouts_get_selected_list (void)
if (retval == NULL) {
if (initial_config.layouts_variants != NULL) {
for (i = 0; initial_config.layouts_variants[i] != NULL; i++)
- retval =
+ retval =
g_slist_prepend (retval, g_strdup (initial_config.layouts_variants[i]));
}
retval = g_slist_reverse (retval);
diff --git a/capplets/keyboard/mate-keyboard-properties-xkbltadd.c b/capplets/keyboard/mate-keyboard-properties-xkbltadd.c
index 6b54fff2..8499314a 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkbltadd.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkbltadd.c
@@ -408,7 +408,7 @@ xkl_layout_chooser_add_default_switcher_if_necessary (GSList *
(layouts_list_strv, options_list_strv, &was_appended);
if (was_appended) {
xkb_options_set_selected_list (options_list);
-
+
}
clear_xkb_elements_list (options_list);
}
diff --git a/capplets/keyboard/mate-keyboard-properties-xkbot.c b/capplets/keyboard/mate-keyboard-properties-xkbot.c
index e67fcf86..cc161b62 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkbot.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkbot.c
@@ -63,7 +63,7 @@ xkb_options_get_selected_list (void)
if (retval == NULL) {
if (initial_config.options != NULL) {
for (i = 0; initial_config.options[i] != NULL; i++)
- retval =
+ retval =
g_slist_prepend (retval, g_strdup (initial_config.options[i]));
}
retval = g_slist_reverse (retval);
diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c
index fe8bad31..98efc439 100644
--- a/capplets/mouse/mate-mouse-properties.c
+++ b/capplets/mouse/mate-mouse-properties.c
@@ -284,7 +284,7 @@ setup_dialog (GtkBuilder *dialog)
g_settings_bind (mouse_settings, DOUBLE_CLICK_KEY,
gtk_range_get_adjustment (GTK_RANGE (WID ("delay_scale"))), "value",
G_SETTINGS_BIND_DEFAULT);
-
+
gtk_image_set_from_stock (GTK_IMAGE (WID ("double_click_image")), MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size ());
g_object_set_data (G_OBJECT (WID ("double_click_eventbox")), "image", WID ("double_click_image"));
g_signal_connect (WID ("double_click_eventbox"), "button_press_event",
@@ -339,10 +339,10 @@ setup_dialog (GtkBuilder *dialog)
gtk_box_pack_start (GTK_BOX (WID ("hbox_three_finger_click")), three_click_comboxbox, FALSE, FALSE, 6);
int i;
for (i=0; i<4; i++) {
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (two_click_comboxbox), emulation_values[i]);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (three_click_comboxbox), emulation_values[i]);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (two_click_comboxbox), emulation_values[i]);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (three_click_comboxbox), emulation_values[i]);
}
-
+
g_signal_connect (two_click_comboxbox, "changed", G_CALLBACK (comboxbox_two_finger_changed_callback), dialog);
g_signal_connect (three_click_comboxbox, "changed", G_CALLBACK (comboxbox_three_finger_changed_callback), dialog);
gtk_combo_box_set_active (GTK_COMBO_BOX (two_click_comboxbox), g_settings_get_int (touchpad_settings, "two-finger-click"));
diff --git a/capplets/time-admin/src/main.c b/capplets/time-admin/src/main.c
index 96d0df6d..f33864f7 100644
--- a/capplets/time-admin/src/main.c
+++ b/capplets/time-admin/src/main.c
@@ -1,4 +1,4 @@
-/* mate-user-admin
+/* mate-user-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
@@ -30,25 +30,25 @@ static gboolean CheckClockHealth(gpointer data)
TimeAdmin *ta = (TimeAdmin *)data;
Update_Clock_Start(ta);
ta->ApplyId = 0;
-
+
return FALSE;
-}
+}
static void update_apply_timeout(TimeAdmin *ta)
{
Update_Clock_Stop(ta);
- if (ta->ApplyId > 0)
+ if (ta->ApplyId > 0)
{
g_source_remove (ta->ApplyId);
ta->ApplyId = 0;
}
ta->ApplyId = g_timeout_add (10000, (GSourceFunc)CheckClockHealth,ta);
-}
+}
static void ChangeTimeValue(GtkSpinButton *spin_button,
gpointer *data)
{
TimeAdmin *ta = (TimeAdmin *)data;
if(TimeoutFlag == 0)
- {
+ {
update_apply_timeout(ta);
}
}
@@ -62,16 +62,16 @@ static GdkPixbuf * GetAppIcon(void)
{
MessageReport(("Get Icon Fail"),Error->message,ERROR);
g_error_free(Error);
- }
-
+ }
+
return Pixbuf;
-}
+}
static gboolean on_window_quit (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
TimeAdmin *ta = (TimeAdmin *)user_data;
-
+
QuitApp(ta);
return TRUE;
}
@@ -80,7 +80,7 @@ static void CloseWindow (GtkButton *button,gpointer data)
TimeAdmin *ta = (TimeAdmin *)data;
QuitApp(ta);
-}
+}
static void UpdatePermission(TimeAdmin *ta)
{
gboolean is_authorized;
@@ -116,7 +116,7 @@ static void InitMainWindow(TimeAdmin *ta)
gtk_window_set_resizable(GTK_WINDOW(Window),FALSE);
gtk_window_set_hide_titlebar_when_maximized(GTK_WINDOW(Window),TRUE);
gtk_window_set_position(GTK_WINDOW(Window), GTK_WIN_POS_CENTER);
- gtk_window_set_title(GTK_WINDOW(Window),_("Time and Date Manager"));
+ gtk_window_set_title(GTK_WINDOW(Window),_("Time and Date Manager"));
gtk_container_set_border_width(GTK_CONTAINER(Window),10);
gtk_widget_set_size_request(Window, 300, 360);
g_signal_connect(G_OBJECT(Window),
@@ -152,39 +152,39 @@ static int RecordPid(void)
{
int pid = 0;
int fd;
- int Length = 0;
+ int Length = 0;
char WriteBuf[30] = { 0 };
fd = open(LOCKFILE,O_WRONLY|O_CREAT|O_TRUNC,0777);
if(fd < 0)
{
MessageReport(_("open file"),_("Create pid file failed"),ERROR);
- return -1;
- }
- chmod(LOCKFILE,0777);
+ return -1;
+ }
+ chmod(LOCKFILE,0777);
pid = getpid();
sprintf(WriteBuf,"%d",pid);
Length = write(fd,WriteBuf,strlen(WriteBuf));
if(Length <= 0 )
{
MessageReport(_("write file"),_("write pid file failed"),ERROR);
- return -1;
- }
+ return -1;
+ }
close(fd);
return 0;
-}
+}
/******************************************************************************
-* Function: ProcessRuning
-*
-* Explain: Check whether the process has been started,If the process is not started,
+* Function: ProcessRuning
+*
+* Explain: Check whether the process has been started,If the process is not started,
* record the current process ID =====>"/tmp/user-admin.pid"
-*
-* Input:
-*
-*
+*
+* Input:
+*
+*
* Output: start :TRUE
* not start :FALSE
-*
+*
* Author: zhuyaliang 31/07/2018
******************************************************************************/
static gboolean ProcessRuning(void)
@@ -201,38 +201,38 @@ static gboolean ProcessRuning(void)
{
MessageReport(_("open file"),_("open pid file failed"),ERROR);
return TRUE;
- }
+ }
if(read(fd,ReadBuf,sizeof(ReadBuf)) <= 0)
{
MessageReport(_("read file"),_("read pid file failed"),ERROR);
goto ERROREXIT;
- }
+ }
pid = atoi(ReadBuf);
if(kill(pid,0) == 0)
- {
+ {
goto ERROREXIT;
}
}
-
+
if(RecordPid() < 0)
Run = TRUE;
-
+
return Run;
ERROREXIT:
close(fd);
return TRUE;
-}
+}
static char *translate(const char *value)
{
g_autofree gchar *zone_translated = NULL;
char *name;
-
+
zone_translated = g_strdup (dgettext (GETTEXT_PACKAGE_TIMEZONES,value));
name = g_strdup_printf (C_("timezone loc", "%s"),zone_translated);
-
+
return name;
-}
+}
static GtkWidget * TimeZoneAndNtp(TimeAdmin *ta)
{
GtkWidget *table;
@@ -249,8 +249,8 @@ static GtkWidget * TimeZoneAndNtp(TimeAdmin *ta)
gtk_widget_set_halign(TimeZoneLabel,GTK_ALIGN_START);
SetLableFontType(TimeZoneLabel,11,_("Time Zone:"));
gtk_grid_attach(GTK_GRID(table) ,TimeZoneLabel, 0 , 0 , 1 , 1);
-
- SetupTimezoneDialog(ta);
+
+ SetupTimezoneDialog(ta);
TimeZone = GetTimeZone(ta);
ZoneName = translate(TimeZone);
ta->TimeZoneButton = gtk_button_new_with_label(ZoneName);
@@ -260,12 +260,12 @@ static GtkWidget * TimeZoneAndNtp(TimeAdmin *ta)
ta);
gtk_grid_attach(GTK_GRID(table) ,ta->TimeZoneButton,1 , 0 , 3 , 1);
-
+
NtpSyncLabel = gtk_label_new(NULL);
gtk_widget_set_halign(NtpSyncLabel,GTK_ALIGN_START);
SetLableFontType(NtpSyncLabel,11,_("Ntp Sync:"));
gtk_grid_attach(GTK_GRID(table) ,NtpSyncLabel, 0 , 1 , 1 , 1);
-
+
ta->NtpSyncSwitch = gtk_switch_new();
NtpState = GetNtpState(ta);
ta->NtpState = NtpState;
@@ -276,13 +276,13 @@ static GtkWidget * TimeZoneAndNtp(TimeAdmin *ta)
"state-set",
G_CALLBACK (ChangeNtpSync),
ta);
-
+
gtk_grid_set_row_spacing(GTK_GRID(table), 6);
gtk_grid_set_column_spacing(GTK_GRID(table), 12);
return table;
-}
+}
static GtkWidget *GetSpinButton(int Initial,int Maximum,TimeAdmin *ta)
{
@@ -301,45 +301,45 @@ static GtkWidget *GetSpinButton(int Initial,int Maximum,TimeAdmin *ta)
G_CALLBACK (ChangeTimeValue),
ta);
- SetTooltip(SpinButton,!ta->NtpState);
+ SetTooltip(SpinButton,!ta->NtpState);
return SpinButton;
-}
+}
static GtkWidget *SetClock(TimeAdmin *ta)
{
GtkWidget *table;
GtkWidget *TimeLabel;
struct tm *LocalTime;
-
+
table = gtk_grid_new();
gtk_grid_set_column_homogeneous(GTK_GRID(table),TRUE);
-
+
TimeLabel = gtk_label_new(NULL);
SetLableFontType(TimeLabel,13,_("Set Time"));
gtk_widget_set_halign(TimeLabel,GTK_ALIGN_CENTER);
gtk_widget_set_valign(TimeLabel,GTK_ALIGN_START);
gtk_widget_set_hexpand(TimeLabel,FALSE);
gtk_grid_attach(GTK_GRID(table) ,TimeLabel, 1 , 0 , 1 , 1);
-
+
LocalTime = GetCurrentTime();
ta->UpdateTimeId = 0;
ta->ApplyId = 0;
-
+
ta->HourSpin = GetSpinButton(LocalTime->tm_hour,23,ta);
gtk_grid_attach(GTK_GRID(table) ,ta->HourSpin, 0 , 1 , 1 , 1);
-
+
ta->MinuteSpin = GetSpinButton(LocalTime->tm_min,59,ta);
gtk_grid_attach(GTK_GRID(table) ,ta->MinuteSpin, 1 , 1 , 1 , 1);
ta->SecondSpin = GetSpinButton (LocalTime->tm_sec,59,ta);
gtk_grid_attach(GTK_GRID(table) ,ta->SecondSpin, 2 , 1 , 1 , 1);
-
+
Update_Clock_Start(ta);
-
+
gtk_grid_set_row_spacing(GTK_GRID(table), 6);
gtk_grid_set_column_spacing(GTK_GRID(table), 12);
-
+
return table;
-}
+}
static GtkWidget *SetDate(TimeAdmin *ta)
{
@@ -349,15 +349,15 @@ static GtkWidget *SetDate(TimeAdmin *ta)
table = gtk_grid_new();
gtk_grid_set_column_homogeneous(GTK_GRID(table),TRUE);
-
+
DateLabel = gtk_label_new(NULL);
SetLableFontType(DateLabel,13,_("Set Date"));
gtk_grid_attach(GTK_GRID(table) ,DateLabel, 1 , 0 , 2 , 2);
-
+
LocalTime = GetCurrentTime();
ta->Calendar = gtk_calendar_new ();
gtk_widget_set_sensitive(ta->Calendar,!ta->NtpState);
- SetTooltip(ta->Calendar,!ta->NtpState);
+ SetTooltip(ta->Calendar,!ta->NtpState);
gtk_calendar_mark_day(GTK_CALENDAR(ta->Calendar),LocalTime->tm_mday);
ta->OldDay = LocalTime->tm_mday;
gtk_grid_attach(GTK_GRID(table) ,ta->Calendar, 0 , 2 , 4 , 3);
@@ -368,9 +368,9 @@ static GtkWidget *SetDate(TimeAdmin *ta)
"clicked",
G_CALLBACK (CloseWindow),
ta);
-
+
gtk_grid_attach(GTK_GRID(table) ,ta->ButtonLock, 0 , 5 , 1 , 1);
-
+
ta->SaveButton = gtk_button_new_with_label (_("Save"));
gtk_widget_set_sensitive(ta->SaveButton,!ta->NtpState);
gtk_grid_attach(GTK_GRID(table) ,ta->SaveButton, 2 , 5 , 1 , 1);
@@ -381,7 +381,7 @@ static GtkWidget *SetDate(TimeAdmin *ta)
gtk_grid_set_row_spacing(GTK_GRID(table), 6);
gtk_grid_set_column_spacing(GTK_GRID(table), 12);
-
+
return table;
}
@@ -394,7 +394,7 @@ static void CreateClockInterface(TimeAdmin *ta)
Vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
gtk_container_add(GTK_CONTAINER(ta->MainWindow), Vbox);
-
+
Vbox1 = TimeZoneAndNtp(ta);
gtk_box_pack_start(GTK_BOX(Vbox),Vbox1,TRUE,TRUE,8);
@@ -402,7 +402,7 @@ static void CreateClockInterface(TimeAdmin *ta)
gtk_box_pack_start(GTK_BOX(Vbox),Vbox2,TRUE,TRUE,8);
Vbox3 = SetDate(ta);
gtk_box_pack_start(GTK_BOX(Vbox),Vbox3,TRUE,TRUE,8);
-}
+}
static gboolean InitDbusProxy(TimeAdmin *ta)
{
GError *error = NULL;
@@ -412,7 +412,7 @@ static gboolean InitDbusProxy(TimeAdmin *ta)
{
MessageReport(_("g_bus_get_sync"),error->message,ERROR);
goto EXIT;
- }
+ }
ta->proxy = g_dbus_proxy_new_sync (ta->Connection,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
@@ -425,29 +425,29 @@ static gboolean InitDbusProxy(TimeAdmin *ta)
{
MessageReport(_("g_bus_proxy_new"),error->message,ERROR);
goto EXIT;
- }
+ }
return TRUE;
EXIT:
g_error_free(error);
return FALSE;
-}
+}
int main(int argc, char **argv)
{
TimeAdmin ta;
- bindtextdomain (PACKAGE,MATELOCALEDIR);
- textdomain (PACKAGE);
- bind_textdomain_codeset (GETTEXT_PACKAGE_TIMEZONES, "UTF-8");
-
+ bindtextdomain (PACKAGE,MATELOCALEDIR);
+ textdomain (PACKAGE);
+ bind_textdomain_codeset (GETTEXT_PACKAGE_TIMEZONES, "UTF-8");
+
gtk_init(&argc, &argv);
-
+
/* Create the main window */
InitMainWindow(&ta);
/* Check whether the process has been started */
if(ProcessRuning() == TRUE)
- exit(0);
+ exit(0);
if(InitDbusProxy(&ta) == FALSE)
{
exit(0);
@@ -456,6 +456,6 @@ int main(int argc, char **argv)
UpdatePermission(&ta);
gtk_widget_show_all(ta.MainWindow);
gtk_main();
-
+
return TRUE;
}
diff --git a/capplets/time-admin/src/time-map.c b/capplets/time-admin/src/time-map.c
index 10a3666e..ad38ef52 100644
--- a/capplets/time-admin/src/time-map.c
+++ b/capplets/time-admin/src/time-map.c
@@ -1,4 +1,4 @@
-/* time-admin
+/* time-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
@@ -31,13 +31,13 @@ typedef struct
guchar green;
guchar blue;
guchar alpha;
-}TimezoneMapOffset;
+}TimezoneMapOffset;
enum
{
LOCATION_CHANGED,
LAST_SIGNAL
};
-
+
G_DEFINE_TYPE (TimezoneMap, timezone_map, GTK_TYPE_WIDGET)
static guint signals[LAST_SIGNAL];
static TimezoneMapOffset color_codes[] =
@@ -428,13 +428,13 @@ set_location (TimezoneMap *map,
TzLocation *location)
{
g_autoptr(TzInfo) info = NULL;
-
+
map->location = location;
info = tz_info_from_location (map->location);
map->selected_offset = tz_location_get_utc_offset (map->location)
- / (60.0*60.0) +
+ / (60.0*60.0) +
((info->daylight) ? -1.0 : 0.0);
-
+
g_signal_emit (map, signals[LOCATION_CHANGED], 0, map->location,NULL);
}
@@ -524,8 +524,8 @@ timezone_map_class_init (TimezoneMapClass *klass)
widget_class->realize = cc_timezone_map_realize;
widget_class->draw = cc_timezone_map_draw;
widget_class->state_flags_changed = cc_timezone_map_state_flags_changed;
-
-
+
+
signals[LOCATION_CHANGED] = g_signal_new ("location-changed",
TYPE_TIMEZONE_MAP,
G_SIGNAL_RUN_FIRST,
@@ -541,10 +541,10 @@ static void
timezone_map_init (TimezoneMap *map)
{
GError *err = NULL;
-
+
map->orig_background = gdk_pixbuf_new_from_file (TIMPZONEDIR"bg.png",&err);
if (!map->orig_background)
- {
+ {
g_warning ("Could not load background image: %s",
(err) ? err->message : "Unknown error");
g_clear_error (&err);
@@ -575,10 +575,10 @@ timezone_map_init (TimezoneMap *map)
map->tzdb = tz_load_db ();
- g_signal_connect_object (map,
- "button-press-event",
- G_CALLBACK (button_press_event),
- map,
+ g_signal_connect_object (map,
+ "button-press-event",
+ G_CALLBACK (button_press_event),
+ map,
G_CONNECT_SWAPPED);
}
gboolean timezone_map_set_timezone (TimezoneMap *map,
@@ -588,7 +588,7 @@ gboolean timezone_map_set_timezone (TimezoneMap *map,
guint i;
g_autofree gchar *real_tz = NULL;
gboolean ret;
-
+
real_tz = tz_info_get_clean_name (map->tzdb, timezone);
locations = tz_get_locations (map->tzdb);
@@ -612,7 +612,7 @@ gboolean timezone_map_set_timezone (TimezoneMap *map,
return ret;
}
TzLocation *timezone_map_get_location (TimezoneMap *map)
-{
+{
return map->location;
}
void timezone_map_set_bubble_text (TimezoneMap *map,
@@ -624,6 +624,6 @@ void timezone_map_set_bubble_text (TimezoneMap *map,
}
TimezoneMap * timezone_map_new (void)
-{
+{
return g_object_new (TYPE_TIMEZONE_MAP, NULL);
-}
+}
diff --git a/capplets/time-admin/src/time-map.h b/capplets/time-admin/src/time-map.h
index e7e574dc..979dceaf 100644
--- a/capplets/time-admin/src/time-map.h
+++ b/capplets/time-admin/src/time-map.h
@@ -1,4 +1,4 @@
-/* time-admin
+/* time-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
@@ -49,7 +49,7 @@ typedef struct TimezoneMap
typedef struct TimezoneMapClass
{
GtkWidgetClass parent_class;
-
+
} TimezoneMapClass;
GType timezone_map_get_type (void) G_GNUC_CONST;
@@ -62,7 +62,7 @@ gboolean timezone_map_set_timezone (TimezoneMap *map,
TzLocation *timezone_map_get_location (TimezoneMap *map);
-TimezoneMap * timezone_map_new (void);
+TimezoneMap * timezone_map_new (void);
G_END_DECLS
#endif
diff --git a/capplets/time-admin/src/time-share.c b/capplets/time-admin/src/time-share.c
index b4c34e80..797f506f 100644
--- a/capplets/time-admin/src/time-share.c
+++ b/capplets/time-admin/src/time-share.c
@@ -1,4 +1,4 @@
-/* time-admin
+/* time-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
@@ -22,14 +22,14 @@
/******************************************************************************
* Function: MessageReport
-*
+*
* Explain: Prompt information dialog
-*
+*
* Input: @Title Message title
-* @Msg Message content
+* @Msg Message content
* @nType Message type
-* Output:
-*
+* Output:
+*
* Author: zhuyaliang 25/05/2018
******************************************************************************/
int MessageReport(const char *Title,const char *Msg,int nType)
@@ -85,7 +85,7 @@ int MessageReport(const char *Title,const char *Msg,int nType)
GTK_BUTTONS_YES_NO,
"%s",Title);
break;
- }
+ }
default :
break;
@@ -114,12 +114,12 @@ void QuitApp(TimeAdmin *ta)
if(ta->UpdateTimeId > 0)
{
g_source_remove (ta->UpdateTimeId);
- }
+ }
if(ta->ApplyId > 0)
{
g_source_remove(ta->ApplyId);
- }
-
+ }
+
gtk_main_quit();
}
GtkWidget* DialogAddButtonWithIconName (GtkDialog *dialog,
diff --git a/capplets/time-admin/src/time-share.h b/capplets/time-admin/src/time-share.h
index a0088a87..e5e8a476 100644
--- a/capplets/time-admin/src/time-share.h
+++ b/capplets/time-admin/src/time-share.h
@@ -1,4 +1,4 @@
-/* time-admin
+/* time-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
@@ -46,7 +46,7 @@
GtkWidget *WindowLogin;
int TimeoutFlag;
-typedef struct
+typedef struct
{
GtkWidget *MainWindow;
GtkWidget *HourSpin;
@@ -57,7 +57,7 @@ typedef struct
GtkWidget *Calendar;
GtkWidget *CloseButton;
GtkWidget *SaveButton;
- int UpdateTimeId;
+ int UpdateTimeId;
int ApplyId;
int OldDay;
gboolean NtpState;
diff --git a/capplets/time-admin/src/time-tool.c b/capplets/time-admin/src/time-tool.c
index f2375808..0e12bd65 100644
--- a/capplets/time-admin/src/time-tool.c
+++ b/capplets/time-admin/src/time-tool.c
@@ -1,4 +1,4 @@
-/* time-admin
+/* time-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
@@ -25,20 +25,20 @@ struct tm *GetCurrentTime(void)
time_t tt;
tzset();
tt=time(NULL);
-
+
return localtime(&tt);
}
static void UpdateDate(TimeAdmin *ta,gboolean state)
{
struct tm *LocalTime;
-
+
if(state == TRUE)
- {
+ {
LocalTime = GetCurrentTime();
- gtk_calendar_select_month (GTK_CALENDAR (ta->Calendar),
+ gtk_calendar_select_month (GTK_CALENDAR (ta->Calendar),
LocalTime->tm_mon,
LocalTime->tm_year+1900);
- gtk_calendar_select_day (GTK_CALENDAR (ta->Calendar),
+ gtk_calendar_select_day (GTK_CALENDAR (ta->Calendar),
LocalTime->tm_mday);
}
}
@@ -47,18 +47,18 @@ static gboolean UpdateClock(gpointer data)
TimeAdmin *ta = (TimeAdmin *)data;
struct tm *LocalTime;
gchar *str;
-
+
LocalTime = GetCurrentTime();
TimeoutFlag = 1;
gtk_spin_button_set_value(GTK_SPIN_BUTTON(ta->HourSpin),LocalTime->tm_hour);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(ta->MinuteSpin),LocalTime->tm_min);
str = g_strdup_printf ("%02d", LocalTime->tm_sec);
gtk_entry_set_text(GTK_ENTRY(ta->SecondSpin),str);
-
- UpdateDate(ta,ta->NtpState);
+
+ UpdateDate(ta,ta->NtpState);
gtk_calendar_mark_day(GTK_CALENDAR(ta->Calendar),LocalTime->tm_mday);
if(LocalTime->tm_mday != ta->OldDay)
- {
+ {
gtk_calendar_unmark_day(GTK_CALENDAR(ta->Calendar),ta->OldDay);
ta->OldDay = LocalTime->tm_mday;
}
@@ -72,16 +72,16 @@ void Update_Clock_Start(TimeAdmin *ta)
if(ta->UpdateTimeId <= 0)
{
ta->UpdateTimeId = g_timeout_add(1000,(GSourceFunc)UpdateClock,ta);
- }
+ }
-}
+}
void Update_Clock_Stop(TimeAdmin *ta)
{
if(ta->UpdateTimeId > 0)
{
g_source_remove(ta->UpdateTimeId);
ta->UpdateTimeId = 0;
- }
+ }
}
gboolean GetNtpState(TimeAdmin *ta)
{
@@ -102,7 +102,7 @@ gboolean GetNtpState(TimeAdmin *ta)
{
goto EXIT;
}
-
+
ret = g_dbus_proxy_call_sync (proxy,
"Get",
g_variant_new ("(ss)",
@@ -124,7 +124,7 @@ EXIT:
g_error_free(error);
return FALSE;
-}
+}
const gchar *GetTimeZone(TimeAdmin *ta)
{
@@ -145,7 +145,7 @@ const gchar *GetTimeZone(TimeAdmin *ta)
{
goto EXIT;
}
-
+
ret = g_dbus_proxy_call_sync (proxy,
"Get",
g_variant_new ("(ss)",
@@ -172,7 +172,7 @@ void SetTimeZone(GDBusProxy *proxy,const char *zone)
{
GError *error = NULL;
GVariant *ret;
-
+
ret = g_dbus_proxy_call_sync (proxy,
"SetTimezone",
g_variant_new ("(sb)",zone,1),
@@ -184,20 +184,20 @@ void SetTimeZone(GDBusProxy *proxy,const char *zone)
if(ret == NULL)
{
MessageReport(_("Set time zone"),error->message,ERROR);
- }
-}
+ }
+}
static void ChangeSpinBttonState(TimeAdmin *ta,gboolean State)
{
gtk_widget_set_sensitive(ta->SaveButton,!State);
- SetTooltip(ta->SaveButton,!ta->NtpState);
+ SetTooltip(ta->SaveButton,!ta->NtpState);
gtk_widget_set_sensitive(ta->HourSpin, !State);
- SetTooltip(ta->HourSpin,!ta->NtpState);
+ SetTooltip(ta->HourSpin,!ta->NtpState);
gtk_widget_set_sensitive(ta->MinuteSpin,!State);
- SetTooltip(ta->MinuteSpin,!ta->NtpState);
+ SetTooltip(ta->MinuteSpin,!ta->NtpState);
gtk_widget_set_sensitive(ta->SecondSpin,!State);
- SetTooltip(ta->SecondSpin,!ta->NtpState);
+ SetTooltip(ta->SecondSpin,!ta->NtpState);
gtk_widget_set_sensitive(ta->Calendar, !State);
- SetTooltip(ta->Calendar,!ta->NtpState);
+ SetTooltip(ta->Calendar,!ta->NtpState);
}
gboolean ChangeNtpSync(GtkSwitch *widget,gboolean state,gpointer data)
@@ -205,7 +205,7 @@ gboolean ChangeNtpSync(GtkSwitch *widget,gboolean state,gpointer data)
TimeAdmin *ta = (TimeAdmin *)data;
GError *error = NULL;
GVariant *ret;
-
+
ret = g_dbus_proxy_call_sync (ta->proxy,
"SetNTP",
g_variant_new ("(bb)",state,state),
@@ -219,22 +219,22 @@ gboolean ChangeNtpSync(GtkSwitch *widget,gboolean state,gpointer data)
MessageReport(_("Set Ntp sync"),error->message,ERROR);
g_error_free(error);
return TRUE;
- }
+ }
else
{
ta->NtpState = state;
ChangeSpinBttonState(ta,state);
Update_Clock_Start(ta);
UpdateDate(ta,state);
- }
+ }
return FALSE;
-}
+}
static guint GetTimeStamp(TimeAdmin *ta)
{
guint year,month,day,hour,min,sec;
GDateTime *dt;
char *st;
-
+
gtk_calendar_get_date(GTK_CALENDAR(ta->Calendar),&year,&month,&day);
hour = gtk_spin_button_get_value(GTK_SPIN_BUTTON(ta->HourSpin));
min = gtk_spin_button_get_value(GTK_SPIN_BUTTON(ta->MinuteSpin));
@@ -249,7 +249,7 @@ static void SetTime(GDBusProxy *proxy,gint64 TimeSec)
{
GError *error = NULL;
GVariant *ret;
-
+
ret = g_dbus_proxy_call_sync (proxy,
"SetTime",
g_variant_new ("(xbb)",TimeSec * 1000 * 1000,0,0),
@@ -262,8 +262,8 @@ static void SetTime(GDBusProxy *proxy,gint64 TimeSec)
{
MessageReport(_("Set Ntp sync"),error->message,ERROR);
g_error_free(error);
- }
-}
+ }
+}
void SaveModifyTime (GtkButton *button,gpointer data)
{
TimeAdmin *ta = (TimeAdmin *)data;
@@ -277,5 +277,5 @@ void SaveModifyTime (GtkButton *button,gpointer data)
else
{
MessageReport(_("Set Time"),_("NTP synchronization has been started, the modification is invalid"),INFOR);
- }
-}
+ }
+}
diff --git a/capplets/time-admin/src/time-tool.h b/capplets/time-admin/src/time-tool.h
index ad098bce..f5461b0d 100644
--- a/capplets/time-admin/src/time-tool.h
+++ b/capplets/time-admin/src/time-tool.h
@@ -1,4 +1,4 @@
-/* time-admin
+/* time-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
diff --git a/capplets/time-admin/src/time-zone.c b/capplets/time-admin/src/time-zone.c
index b2c6265c..a0852bf2 100644
--- a/capplets/time-admin/src/time-zone.c
+++ b/capplets/time-admin/src/time-zone.c
@@ -1,4 +1,4 @@
-/* time-admin
+/* time-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
@@ -94,8 +94,8 @@ static void load_backward_tz (TzDB *tz_db)
{
g_error("%s does not exist\r\n",BACKFILE);
- }
- while(fgets(buf,128,fp))
+ }
+ while(fgets(buf,128,fp))
{
g_auto(GStrv) items = NULL;
guint j;
@@ -128,26 +128,26 @@ static void load_backward_tz (TzDB *tz_db)
real = "Etc/GMT";
g_hash_table_insert (tz_db->backward, g_strdup (alias), g_strdup (real));
-
- }
+
+ }
fclose(fp);
}
TzDB *tz_load_db (void)
-{
+{
g_autofree gchar *tz_data_file = NULL;
TzDB *tz_db;
FILE *tzfile;
char buf[4096];
tz_data_file = tz_data_file_get ();
- if (!tz_data_file)
+ if (!tz_data_file)
{
g_warning ("Could not get the TimeZone data file name");
return NULL;
}
tzfile = fopen (tz_data_file, "r");
- if (!tzfile)
+ if (!tzfile)
{
g_warning ("Could not open *%s*\n", tz_data_file);
return NULL;
@@ -224,15 +224,15 @@ static GtkWidget *GetTimeZoneMap(TimeAdmin *ta)
"location-changed",
G_CALLBACK (LocationChanged),
ta);
-
+
completion = gtk_entry_completion_new ();
gtk_entry_set_completion (GTK_ENTRY (ta->TimezoneEntry), completion);
gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (ta->CityListStore));
gtk_entry_completion_set_text_column (completion, CITY_COL_CITY_HUMAN_READABLE);
-
+
return map;
-}
+}
static char *
translated_city_name (TzLocation *loc)
{
@@ -273,7 +273,7 @@ update_timezone (TimezoneMap *map)
current_location = timezone_map_get_location (TIMEZONEMAP (map));
city_country = translated_city_name (current_location);
-
+
timezone = g_time_zone_new (current_location->zone);
current_date = g_date_time_new_now_local ();
date = g_date_time_to_timezone (current_date, timezone);
@@ -323,12 +323,12 @@ static void LoadCities (TzLocation *loc,
g_autofree gchar *human_readable = NULL;
human_readable = translated_city_name (loc);
- gtk_list_store_insert_with_values (CityStore,
- NULL,
+ gtk_list_store_insert_with_values (CityStore,
+ NULL,
0,
- CITY_COL_CITY_HUMAN_READABLE,
+ CITY_COL_CITY_HUMAN_READABLE,
human_readable,
- CITY_COL_ZONE,
+ CITY_COL_ZONE,
loc->zone,
-1);
}
@@ -336,13 +336,13 @@ static void LoadCities (TzLocation *loc,
static void CreateCityList(TimeAdmin *ta)
{
g_autoptr(TzDB) db = NULL;
-
+
ta->CityListStore = gtk_list_store_new (CITY_NUM_COLS,G_TYPE_STRING,G_TYPE_STRING);
-
+
db = tz_load_db ();
g_ptr_array_foreach (db->locations, (GFunc) LoadCities, ta->CityListStore);
-}
+}
static GtkWidget *CreateZoneFrame(TimeAdmin *ta)
{
GtkWidget *TimeZoneFrame;
@@ -350,9 +350,9 @@ static GtkWidget *CreateZoneFrame(TimeAdmin *ta)
TimeZoneFrame = gtk_frame_new (_("Time Zone"));
gtk_widget_set_size_request(TimeZoneFrame,300,200);
gtk_frame_set_shadow_type(GTK_FRAME(TimeZoneFrame),GTK_SHADOW_NONE);
-
+
return TimeZoneFrame;
-}
+}
static GtkWidget *CreateZoneScrolled(TimeAdmin *ta)
{
GtkWidget *Scrolled;
@@ -364,11 +364,11 @@ static GtkWidget *CreateZoneScrolled(TimeAdmin *ta)
GTK_SHADOW_IN);
return Scrolled;
-}
+}
static void CreateZoneEntry(TimeAdmin *ta)
{
GtkWidget *hbox;
-
+
ta->TimezoneEntry = gtk_search_entry_new ();
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_widget_set_halign (hbox, GTK_ALIGN_CENTER);
@@ -381,7 +381,7 @@ static void CreateZoneEntry(TimeAdmin *ta)
gtk_container_add (GTK_CONTAINER (ta->SearchBar), hbox);
gtk_search_bar_set_search_mode(GTK_SEARCH_BAR(ta->SearchBar),TRUE);
-}
+}
static gboolean CityChanged(GtkEntryCompletion *completion,
GtkTreeModel *model,
@@ -391,9 +391,9 @@ static gboolean CityChanged(GtkEntryCompletion *completion,
GtkWidget *entry;
g_autofree gchar *zone = NULL;
- gtk_tree_model_get (model,
+ gtk_tree_model_get (model,
iter,
- CITY_COL_ZONE,
+ CITY_COL_ZONE,
&zone,
-1);
timezone_map_set_timezone (TIMEZONEMAP (self->map), zone);
@@ -408,12 +408,12 @@ static void ChoooseTimezoneDone (GtkWidget *widget,
{
TimezoneMap *map;
g_autofree gchar *ZoneCity = NULL;
-
- map = TIMEZONEMAP(ta->map);
+
+ map = TIMEZONEMAP(ta->map);
SetTimeZone(ta->proxy,map->location->zone);
-
+
ZoneCity = translated_city_name(map->location);
- gtk_button_set_label((GTK_BUTTON(ta->TimeZoneButton)),ZoneCity);
+ gtk_button_set_label((GTK_BUTTON(ta->TimeZoneButton)),ZoneCity);
gtk_widget_hide_on_delete(GTK_WIDGET(ta->dialog));
}
@@ -439,12 +439,12 @@ void SetupTimezoneDialog(TimeAdmin *ta)
ta->TZclose = DialogAddButtonWithIconName(GTK_DIALOG(ta->dialog),
_("Close"),
"window-close",
- GTK_RESPONSE_CANCEL);
-
+ GTK_RESPONSE_CANCEL);
+
ta->TZconfire = DialogAddButtonWithIconName(GTK_DIALOG(ta->dialog),
_("Confirm"),
"emblem-default",
- GTK_RESPONSE_OK);
+ GTK_RESPONSE_OK);
g_signal_connect (ta->TZconfire,
"clicked",
G_CALLBACK (ChoooseTimezoneDone),
@@ -455,9 +455,9 @@ void SetupTimezoneDialog(TimeAdmin *ta)
G_CALLBACK (ChoooseTimezoneClose),
ta);
- Vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ Vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_style_context_add_class (gtk_widget_get_style_context (Vbox), "linked");
-
+
TimeZoneFrame = CreateZoneFrame(ta);
Scrolled = CreateZoneScrolled(ta);
@@ -470,11 +470,11 @@ void SetupTimezoneDialog(TimeAdmin *ta)
gtk_container_add (GTK_CONTAINER (Scrolled),ta->map);
gtk_box_pack_start(GTK_BOX(Vbox),TimeZoneFrame,TRUE,TRUE,10);
get_initial_timezone(ta);
-
+
g_signal_connect(gtk_entry_get_completion (GTK_ENTRY (ta->TimezoneEntry)),
- "match-selected",
- G_CALLBACK (CityChanged),
- ta);
+ "match-selected",
+ G_CALLBACK (CityChanged),
+ ta);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (ta->dialog))),
Vbox,
@@ -484,7 +484,7 @@ void SetupTimezoneDialog(TimeAdmin *ta)
void tz_info_free (TzInfo *tzinfo)
{
g_return_if_fail (tzinfo != NULL);
-
+
if (tzinfo->tzname_normal) g_free (tzinfo->tzname_normal);
if (tzinfo->tzname_daylight) g_free (tzinfo->tzname_daylight);
g_free (tzinfo);
@@ -535,18 +535,18 @@ compare_timezones (const char *a,
char *tz_info_get_clean_name (TzDB *tz_db,
const char *tz)
-{
+{
char *ret;
const char *timezone;
guint i;
gboolean replaced;
-
+
/* Remove useless prefixes */
if (g_str_has_prefix (tz, "right/"))
tz = tz + strlen ("right/");
else if (g_str_has_prefix (tz, "posix/"))
tz = tz + strlen ("posix/");
-
+
/* Here start the crazies */
replaced = FALSE;
@@ -625,7 +625,7 @@ TzInfo *tz_info_from_location (TzLocation *loc)
glong tz_location_get_utc_offset (TzLocation *loc)
{
g_autoptr(TzInfo) tz_info = NULL;
- glong offset;
+ glong offset;
tz_info = tz_info_from_location (loc);
offset = tz_info->utc_offset;
diff --git a/capplets/time-admin/src/time-zone.h b/capplets/time-admin/src/time-zone.h
index a0c993d5..70473b24 100644
--- a/capplets/time-admin/src/time-zone.h
+++ b/capplets/time-admin/src/time-zone.h
@@ -1,4 +1,4 @@
-/* time-admin
+/* time-admin
* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
*
* This program is free software: you can redistribute it and/or modify
@@ -27,13 +27,13 @@
#endif
typedef struct TzDB
-{
+{
GPtrArray *locations;
GHashTable *backward;
}TzDB;
-
+
typedef struct TzLocation
-{
+{
gchar *country;
gdouble latitude;
gdouble longitude;
diff --git a/font-viewer/font-model.c b/font-viewer/font-model.c
index f0d6fdf7..8cbc7ae0 100644
--- a/font-viewer/font-model.c
+++ b/font-viewer/font-model.c
@@ -1,5 +1,5 @@
/* -*- mode: C; c-basic-offset: 4 -*-
- * mate-font-view:
+ * mate-font-view:
*
* Copyright (C) 2012 Cosimo Cecchi <[email protected]>
*
@@ -7,7 +7,7 @@
*
* fontilus - a collection of font utilities for MATE
* Copyright (C) 2002-2003 James Henstridge <[email protected]>
- *
+ *
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -627,7 +627,7 @@ font_view_model_class_init (FontViewModelClass *klass)
GObjectClass *oclass = G_OBJECT_CLASS (klass);
oclass->finalize = font_view_model_finalize;
- signals[CONFIG_CHANGED] =
+ signals[CONFIG_CHANGED] =
g_signal_new ("config-changed",
FONT_VIEW_TYPE_MODEL,
G_SIGNAL_RUN_FIRST,
diff --git a/font-viewer/font-thumbnailer.c b/font-viewer/font-thumbnailer.c
index e2a2d3be..9e9d344c 100644
--- a/font-viewer/font-thumbnailer.c
+++ b/font-viewer/font-thumbnailer.c
@@ -289,7 +289,7 @@ main (int argc,
scale = MIN (scale_x, scale_y);
cairo_scale (cr, scale, scale);
- cairo_translate (cr,
+ cairo_translate (cr,
PADDING_HORIZONTAL - text_extents.x_bearing + (thumb_size - scale * text_extents.width) / 2.0,
PADDING_VERTICAL - text_extents.y_bearing + (thumb_size - scale * text_extents.height) / 2.0);
diff --git a/font-viewer/font-view.c b/font-viewer/font-view.c
index 041d9a29..f24a7d8e 100644
--- a/font-viewer/font-view.c
+++ b/font-viewer/font-view.c
@@ -185,7 +185,7 @@ add_row (GtkWidget *grid,
}
gtk_label_set_max_width_chars (GTK_LABEL (label), 64);
- gtk_grid_attach_next_to (GTK_GRID (grid), label,
+ gtk_grid_attach_next_to (GTK_GRID (grid), label,
name_w, GTK_POS_RIGHT,
1, 1);
}
@@ -559,14 +559,14 @@ font_view_application_do_open (FontViewApplication *self,
font_view_ensure_model (self);
self->info_button = gd_main_toolbar_add_button (GD_MAIN_TOOLBAR (self->toolbar),
- NULL, _("Info"),
+ NULL, _("Info"),
FALSE);
g_signal_connect (self->info_button, "clicked",
G_CALLBACK (info_button_clicked_cb), self);
/* add install button */
self->install_button = gd_main_toolbar_add_button (GD_MAIN_TOOLBAR (self->toolbar),
- NULL, _("Install"),
+ NULL, _("Install"),
FALSE);
g_signal_connect (self->install_button, "clicked",
G_CALLBACK (install_button_clicked_cb), self);
@@ -701,7 +701,7 @@ font_view_application_do_overview (FontViewApplication *self)
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (icon_view), cell, FALSE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (icon_view), cell,
"pixbuf", COLUMN_ICON);
-
+
cell = gtk_cell_renderer_text_new ();
g_object_set (cell,
"alignment", PANGO_ALIGN_CENTER,
@@ -787,7 +787,7 @@ action_about (GSimpleAction *action,
"license-type", GTK_LICENSE_GPL_2_0,
"wrap-license", TRUE,
NULL);
-
+
}
static GActionEntry action_entries[] = {
@@ -812,7 +812,7 @@ font_view_application_startup (GApplication *application)
G_APPLICATION_CLASS (font_view_application_parent_class)->startup (application);
- g_action_map_add_action_entries (G_ACTION_MAP (self), action_entries,
+ g_action_map_add_action_entries (G_ACTION_MAP (self), action_entries,
G_N_ELEMENTS (action_entries), self);
builder = gtk_builder_new ();
gtk_builder_add_from_string (builder, app_menu, -1, NULL);
@@ -840,7 +840,7 @@ font_view_application_startup (GApplication *application)
self->toolbar = gd_main_toolbar_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (self->toolbar), "menubar");
self->search_button = gd_main_toolbar_add_toggle (GD_MAIN_TOOLBAR (self->toolbar),
- NULL, _("Search"),
+ NULL, _("Search"),
FALSE);
gtk_container_add (GTK_CONTAINER (self->main_grid), self->toolbar);
@@ -864,11 +864,11 @@ font_view_application_startup (GApplication *application)
self->search_bar = gtk_search_bar_new();
gtk_container_add (GTK_CONTAINER (self->main_grid), self->search_bar);
-
+
self->entry = gtk_search_entry_new();
gtk_entry_set_width_chars (GTK_ENTRY (self->entry), 40);
gtk_container_add (GTK_CONTAINER (self->search_bar), self->entry);
-
+
g_object_bind_property (self->search_bar, "search-mode-enabled",
self->search_button, "active",
G_BINDING_BIDIRECTIONAL);
diff --git a/font-viewer/gd-main-toolbar.c b/font-viewer/gd-main-toolbar.c
index 0a67ca4e..6d9e9c42 100644
--- a/font-viewer/gd-main-toolbar.c
+++ b/font-viewer/gd-main-toolbar.c
@@ -2,16 +2,16 @@
* Copyright (c) 2011, 2012 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
+ * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
@@ -365,7 +365,7 @@ gd_main_toolbar_clear (GdMainToolbar *self)
(GtkCallback) gtk_widget_destroy, self);
gtk_container_foreach (GTK_CONTAINER (self->priv->modes_box),
(GtkCallback) gtk_widget_destroy, self);
- gtk_container_foreach (GTK_CONTAINER (self->priv->right_grid),
+ gtk_container_foreach (GTK_CONTAINER (self->priv->right_grid),
(GtkCallback) gtk_widget_destroy, self);
}
diff --git a/font-viewer/gd-main-toolbar.h b/font-viewer/gd-main-toolbar.h
index 4fa7b532..9be2ddba 100644
--- a/font-viewer/gd-main-toolbar.h
+++ b/font-viewer/gd-main-toolbar.h
@@ -2,16 +2,16 @@
* Copyright (c) 2011, 2012 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
+ * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
diff --git a/font-viewer/sushi-font-widget.c b/font-viewer/sushi-font-widget.c
index ef778579..bad2ffee 100644
--- a/font-viewer/sushi-font-widget.c
+++ b/font-viewer/sushi-font-widget.c
@@ -154,7 +154,7 @@ build_charlist_for_face (FT_Face face,
GString *string;
gulong c;
guint glyph;
- gint total_chars = 0;
+ gint total_chars = 0;
string = g_string_new (NULL);
@@ -254,7 +254,7 @@ build_strings_for_face (SushiFontWidget *self)
self->priv->font_name = NULL;
if (self->priv->face->family_name != NULL) {
- gchar *font_name =
+ gchar *font_name =
g_strconcat (self->priv->face->family_name, " ",
self->priv->face->style_name, NULL);
@@ -387,7 +387,7 @@ sushi_font_widget_size_request (GtkWidget *drawing_area,
if (self->priv->lowercase_text != NULL) {
cairo_text_extents (cr, self->priv->lowercase_text, &extents);
- pixmap_height += font_extents.ascent + font_extents.descent +
+ pixmap_height += font_extents.ascent + font_extents.descent +
extents.y_advance + LINE_SPACING;
pixmap_width = MAX (pixmap_width, extents.width + padding.left + padding.right);
}
diff --git a/font-viewer/totem-resources.c b/font-viewer/totem-resources.c
index 96e90524..2f572598 100644
--- a/font-viewer/totem-resources.c
+++ b/font-viewer/totem-resources.c
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2007 Bastien Nocera <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/font-viewer/totem-resources.h b/font-viewer/totem-resources.h
index 421a03ca..40833ba1 100644
--- a/font-viewer/totem-resources.h
+++ b/font-viewer/totem-resources.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2007 Bastien Nocera <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/libslab/application-tile.c b/libslab/application-tile.c
index 53f46c75..f5b8348b 100644
--- a/libslab/application-tile.c
+++ b/libslab/application-tile.c
@@ -665,7 +665,7 @@ get_desktop_item_startup_status (MateDesktopItem *desktop_item)
StartupStatus retval;
gint x;
-
+
filename = g_filename_from_uri (mate_desktop_item_get_location (desktop_item), NULL, NULL);
if (!filename)
return APP_NOT_ELIGIBLE;
diff --git a/libslab/bookmark-agent.c b/libslab/bookmark-agent.c
index 9c2cbb40..15ed3161 100644
--- a/libslab/bookmark-agent.c
+++ b/libslab/bookmark-agent.c
@@ -222,7 +222,7 @@ bookmark_agent_purge_items (BookmarkAgent *this)
gsize uris_len;
gint i;
g_return_if_fail (priv->user_modifiable);
-
+
uris = g_bookmark_file_get_uris (priv->store, &uris_len);
if (TYPE_IS_RECENT (priv->type)) {
for (i = 0; i < uris_len; i++) {
@@ -277,7 +277,7 @@ bookmark_agent_remove_item (BookmarkAgent *this, const gchar *uri)
if (rank >= 0) {
uris = g_bookmark_file_get_uris (priv->store, NULL);
-
+
for (i = 0; uris && uris [i]; ++i) {
rank_i = get_rank (this, uris [i]);
@@ -865,7 +865,7 @@ load_places_store (BookmarkAgent *this)
gchar **uris;
gchar **groups;
gchar **bookmarks = NULL;
-
+
gchar *buf, *label, *uri;
gint i, j, bookmark_len;
@@ -928,10 +928,10 @@ find_package_data_file (const gchar *filename)
dirs = g_get_system_data_dirs ();
-
+
for (i = 0; ! path && dirs && dirs [i]; ++i) {
path = g_build_filename (dirs [i], PACKAGE, filename, NULL);
-
+
if (! g_file_test (path, G_FILE_TEST_EXISTS)) {
g_free (path);
path = NULL;
@@ -967,7 +967,7 @@ update_user_spec_path (BookmarkAgent *this)
status = BOOKMARK_STORE_DEFAULT_ONLY;
else
status = BOOKMARK_STORE_ABSENT;
-
+
if (priv->status != status) {
priv->status = status;
g_object_notify (G_OBJECT (this), BOOKMARK_AGENT_STORE_STATUS_PROP);
@@ -1193,7 +1193,7 @@ create_dir_item (BookmarkAgent *this, const gchar *uri)
if (name)
g_bookmark_file_set_title (priv->store, uri, name);
-
+
if (uri_new && libslab_strcmp (uri, uri_new))
g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
diff --git a/libslab/nameplate-tile.c b/libslab/nameplate-tile.c
index cdf3c50b..315524ab 100644
--- a/libslab/nameplate-tile.c
+++ b/libslab/nameplate-tile.c
@@ -55,7 +55,7 @@ GtkWidget *nameplate_tile_new (const gchar * uri, GtkWidget * image, GtkWidget *
"tile-uri", uri,
"nameplate-image", image,
"nameplate-header", header,
- "nameplate-subheader", subheader,
+ "nameplate-subheader", subheader,
NULL));
}
diff --git a/libwindow-settings/marco-window-manager.c b/libwindow-settings/marco-window-manager.c
index 489d210d..d5f0d840 100644
--- a/libwindow-settings/marco-window-manager.c
+++ b/libwindow-settings/marco-window-manager.c
@@ -95,7 +95,7 @@ window_manager_new (int expected_interface_version)
g_warning ("Marco window manager module wasn't compiled with the current version of mate-control-center");
return NULL;
}
-
+
wm = g_object_new (marco_window_manager_get_type (), NULL);
return wm;
@@ -119,7 +119,7 @@ add_themes_from_dir (GList *current_list, const char *path)
* only checks existence, not wether we can really read it.*/
if (theme_dir == NULL)
return current_list;
-
+
for (entry = readdir (theme_dir); entry != NULL; entry = readdir (theme_dir)) {
theme_file_path = g_build_filename (path, entry->d_name, "metacity-1/metacity-theme-2.xml", NULL);
@@ -153,13 +153,13 @@ add_themes_from_dir (GList *current_list, const char *path)
/*g_free (entry);*/
g_free (theme_file_path);
}
-
+
closedir (theme_dir);
return current_list;
}
-static GList *
+static GList *
marco_get_theme_list (MateWindowManager *wm)
{
GList *themes = NULL;
@@ -210,7 +210,7 @@ marco_change_settings (MateWindowManager *wm,
g_settings_set_boolean (meta_wm->p->settings,
MARCO_AUTORAISE_KEY,
settings->autoraise);
-
+
if (settings->flags & MATE_WM_SETTING_AUTORAISE_DELAY)
g_settings_set_int (meta_wm->p->settings,
MARCO_AUTORAISE_DELAY_KEY,
@@ -221,7 +221,7 @@ marco_change_settings (MateWindowManager *wm,
MARCO_FONT_KEY,
settings->font);
}
-
+
if (settings->flags & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER) {
char *value;
@@ -253,22 +253,22 @@ marco_get_settings (MateWindowManager *wm,
MarcoWindowManager *meta_wm;
meta_wm = MARCO_WINDOW_MANAGER (wm);
-
+
to_get = settings->flags;
settings->flags = 0;
-
+
if (to_get & MATE_WM_SETTING_COMPOSITING_MANAGER) {
settings->compositing_manager = g_settings_get_boolean (meta_wm->p->settings,
MARCO_COMPOSITING_MANAGER_KEY);
settings->flags |= MATE_WM_SETTING_COMPOSITING_MANAGER;
}
-
+
if (to_get & MATE_WM_SETTING_COMPOSITING_ALTTAB) {
settings->compositing_fast_alt_tab = g_settings_get_boolean (meta_wm->p->settings,
MARCO_COMPOSITING_FAST_ALT_TAB_KEY);
settings->flags |= MATE_WM_SETTING_COMPOSITING_ALTTAB;
}
-
+
if (to_get & MATE_WM_SETTING_MOUSE_FOCUS) {
gint marco_focus_value;
@@ -280,13 +280,13 @@ marco_get_settings (MateWindowManager *wm,
settings->flags |= MATE_WM_SETTING_MOUSE_FOCUS;
}
-
+
if (to_get & MATE_WM_SETTING_AUTORAISE) {
settings->autoraise = g_settings_get_boolean (meta_wm->p->settings,
MARCO_AUTORAISE_KEY);
settings->flags |= MATE_WM_SETTING_AUTORAISE;
}
-
+
if (to_get & MATE_WM_SETTING_AUTORAISE_DELAY) {
settings->autoraise_delay =
g_settings_get_int (meta_wm->p->settings,
@@ -310,12 +310,12 @@ marco_get_settings (MateWindowManager *wm,
g_free (meta_wm->p->font);
meta_wm->p->font = str;
}
-
+
settings->font = meta_wm->p->font;
settings->flags |= MATE_WM_SETTING_FONT;
}
-
+
if (to_get & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER) {
char *str;
const char *new;
@@ -350,7 +350,7 @@ marco_get_settings (MateWindowManager *wm,
g_free (str);
settings->mouse_move_modifier = meta_wm->p->mouse_modifier;
-
+
settings->flags |= MATE_WM_SETTING_MOUSE_MOVE_MODIFIER;
}
@@ -374,7 +374,7 @@ marco_get_settings (MateWindowManager *wm,
settings->double_click_action =
g_settings_get_enum (meta_wm->p->settings,
MARCO_DOUBLE_CLICK_TITLEBAR_KEY);
-
+
settings->flags |= MATE_WM_SETTING_DOUBLE_CLICK_ACTION;
}
}
@@ -398,12 +398,12 @@ marco_get_double_click_actions (MateWindowManager *wm,
{ ACTION_TITLEBAR_MINIMIZE, N_("Minimize") },
{ ACTION_TITLEBAR_NONE, N_("None") }
};
-
+
static gboolean initialized = FALSE;
if (!initialized) {
int i;
-
+
initialized = TRUE;
for (i = 0; i < G_N_ELEMENTS (actions); i++) {
actions[i].human_readable_name = _(actions[i].human_readable_name);
@@ -411,7 +411,7 @@ marco_get_double_click_actions (MateWindowManager *wm,
}
*actions_p = actions;
- *n_actions_p = (int) G_N_ELEMENTS (actions);
+ *n_actions_p = (int) G_N_ELEMENTS (actions);
}
static void
@@ -430,7 +430,7 @@ marco_window_manager_init (MarcoWindowManager *marco_window_manager,
}
static void
-marco_window_manager_finalize (GObject *object)
+marco_window_manager_finalize (GObject *object)
{
MarcoWindowManager *marco_window_manager;
@@ -447,7 +447,7 @@ marco_window_manager_finalize (GObject *object)
static void
-marco_window_manager_class_init (MarcoWindowManagerClass *class)
+marco_window_manager_class_init (MarcoWindowManagerClass *class)
{
GObjectClass *object_class;
MateWindowManagerClass *wm_class;
@@ -463,7 +463,7 @@ marco_window_manager_class_init (MarcoWindowManagerClass *class)
wm_class->get_user_theme_folder = marco_get_user_theme_folder;
wm_class->get_theme_list = marco_get_theme_list;
wm_class->get_double_click_actions = marco_get_double_click_actions;
-
+
parent_class = g_type_class_peek_parent (class);
}
@@ -486,8 +486,8 @@ marco_window_manager_get_type (void)
NULL
};
- marco_window_manager_type =
- g_type_register_static (mate_window_manager_get_type (),
+ marco_window_manager_type =
+ g_type_register_static (mate_window_manager_get_type (),
"MarcoWindowManager",
&marco_window_manager_info, 0);
}
diff --git a/libwindow-settings/mate-window-manager.c b/libwindow-settings/mate-window-manager.c
index d6369c88..c7bbd24a 100644
--- a/libwindow-settings/mate-window-manager.c
+++ b/libwindow-settings/mate-window-manager.c
@@ -57,8 +57,8 @@ mate_window_manager_new (MateDesktopItem *it)
}
success = g_module_symbol (module, "window_manager_new",
- (gpointer *) &wm_new_func);
-
+ (gpointer *) &wm_new_func);
+
if ((!success) || wm_new_func == NULL) {
g_warning ("Couldn't load window manager settings module `%s`, couldn't find symbol \'window_manager_new\'", module_name);
g_free (module_name);
@@ -71,14 +71,14 @@ mate_window_manager_new (MateDesktopItem *it)
if (wm == NULL)
return NULL;
-
+
(MATE_WINDOW_MANAGER (wm))->p->window_manager_name = g_strdup (mate_desktop_item_get_string (it, MATE_DESKTOP_ITEM_NAME));
(MATE_WINDOW_MANAGER (wm))->p->ditem = mate_desktop_item_ref (it);
-
+
return wm;
}
-const char *
+const char *
mate_window_manager_get_name (MateWindowManager *wm)
{
return wm->p->window_manager_name;
@@ -119,7 +119,7 @@ mate_window_manager_get_double_click_actions (MateWindowManager *wm
*actions = NULL;
*n_actions = 0;
-
+
if (klass->get_double_click_actions)
klass->get_double_click_actions (wm, actions, n_actions);
}
@@ -129,7 +129,7 @@ mate_window_manager_change_settings (MateWindowManager *wm,
const MateWMSettings *settings)
{
MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
-
+
(* klass->change_settings) (wm, settings);
}
@@ -145,7 +145,7 @@ mate_window_manager_get_settings (MateWindowManager *wm,
* fields to the caller that the WM module
* doesn't know about
*/
-
+
(* klass->get_settings) (wm, settings);
}
@@ -156,7 +156,7 @@ mate_window_manager_init (MateWindowManager *mate_window_manager, MateWindowMana
}
static void
-mate_window_manager_finalize (GObject *object)
+mate_window_manager_finalize (GObject *object)
{
MateWindowManager *mate_window_manager;
@@ -178,17 +178,17 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
static void
-mate_window_manager_class_init (MateWindowManagerClass *class)
+mate_window_manager_class_init (MateWindowManagerClass *class)
{
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (class);
object_class->finalize = mate_window_manager_finalize;
-
+
parent_class = g_type_class_peek_parent (class);
-
+
signals[SETTINGS_CHANGED] =
g_signal_new ("settings_changed",
G_OBJECT_CLASS_TYPE (class),
@@ -219,10 +219,10 @@ mate_window_manager_get_type (void)
NULL
};
- mate_window_manager_type =
- g_type_register_static (G_TYPE_OBJECT,
+ mate_window_manager_type =
+ g_type_register_static (G_TYPE_OBJECT,
"MateWindowManager",
- &mate_window_manager_info, 0);
+ &mate_window_manager_info, 0);
}
return mate_window_manager_type;
diff --git a/typing-break/drw-monitor.c b/typing-break/drw-monitor.c
index 027f22b5..df6e119b 100644
--- a/typing-break/drw-monitor.c
+++ b/typing-break/drw-monitor.c
@@ -78,7 +78,7 @@ drw_monitor_get_type (void)
};
object_type = g_type_register_static (G_TYPE_OBJECT,
- "DrwMonitor",
+ "DrwMonitor",
&object_info, 0);
}
@@ -89,12 +89,12 @@ static void
drw_monitor_class_init (DrwMonitorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
-
+
object_class->finalize = drw_monitor_finalize;
- signals[ACTIVITY] =
+ signals[ACTIVITY] =
g_signal_new ("activity",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
@@ -108,7 +108,7 @@ static void
drw_monitor_init (DrwMonitor *monitor)
{
DrwMonitorPriv *priv;
-
+
priv = g_new0 (DrwMonitorPriv, 1);
monitor->priv = priv;
@@ -120,7 +120,7 @@ drw_monitor_finalize (GObject *object)
{
DrwMonitor *monitor = DRW_MONITOR (object);
DrwMonitorPriv *priv;
-
+
priv = monitor->priv;
g_source_remove (priv->timeout_id);
@@ -129,7 +129,7 @@ drw_monitor_finalize (GObject *object)
if (priv->ss_info) {
XFree (priv->ss_info);
}
-
+
g_free (priv);
monitor->priv = NULL;
@@ -145,15 +145,15 @@ drw_monitor_timeout (DrwMonitor *monitor)
time_t now;
priv = monitor->priv;
-
+
if (XScreenSaverQueryInfo (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), DefaultRootWindow (GDK_DISPLAY_XDISPLAY(gdk_display_get_default())), priv->ss_info) != 0) {
if (priv->ss_info->idle < priv->last_idle) {
now = time (NULL);
-
+
if (now - priv->last_activity < 25) {
g_signal_emit (monitor, signals[ACTIVITY], 0, NULL);
}
-
+
priv->last_activity = now;
}
@@ -179,9 +179,9 @@ drw_monitor_setup (DrwMonitor *monitor)
priv->ss_info = XScreenSaverAllocInfo ();
priv->last_activity = time (NULL);
-
+
priv->timeout_id = g_timeout_add_seconds (3, (GSourceFunc) drw_monitor_timeout, monitor);
-
+
return TRUE;
}
diff --git a/typing-break/drw-selection.h b/typing-break/drw-selection.h
index f384a4e1..8c0e36ed 100644
--- a/typing-break/drw-selection.h
+++ b/typing-break/drw-selection.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Owen Taylor, Red Hat, Inc.
diff --git a/typing-break/drw-timer.c b/typing-break/drw-timer.c
index 075f40b7..ace2c19f 100644
--- a/typing-break/drw-timer.c
+++ b/typing-break/drw-timer.c
@@ -21,24 +21,24 @@
#include <glib.h>
#include "drw-timer.h"
-struct _DrwTimer
+struct _DrwTimer
{
GTimeVal start_time;
};
-DrwTimer * drw_timer_new ()
+DrwTimer * drw_timer_new ()
{
DrwTimer * timer = g_new0 (DrwTimer, 1);
drw_timer_start (timer);
return timer;
}
-void drw_timer_start (DrwTimer *timer)
+void drw_timer_start (DrwTimer *timer)
{
g_get_current_time (&timer->start_time);
}
-double drw_timer_elapsed (DrwTimer *timer)
+double drw_timer_elapsed (DrwTimer *timer)
{
GTimeVal now;
g_get_current_time (&now);
diff --git a/typing-break/drw-utils.c b/typing-break/drw-utils.c
index bad0869e..c3f754c1 100644
--- a/typing-break/drw-utils.c
+++ b/typing-break/drw-utils.c
@@ -29,7 +29,7 @@ create_tile_pixbuf (GdkPixbuf *dest_pixbuf,
GdkPixbuf *src_pixbuf,
GdkRectangle *field_geom,
guint alpha,
- GdkColor *bg_color)
+ GdkColor *bg_color)
{
gboolean need_composite;
gboolean use_simple;
@@ -60,7 +60,7 @@ create_tile_pixbuf (GdkPixbuf *dest_pixbuf,
if (need_composite && !use_simple)
gdk_pixbuf_composite (src_pixbuf, dest_pixbuf,
cx, cy,
- MIN (pwidth, field_geom->width - cx),
+ MIN (pwidth, field_geom->width - cx),
MIN (pheight, field_geom->height - cy),
cx, cy,
1.0, 1.0,
@@ -69,7 +69,7 @@ create_tile_pixbuf (GdkPixbuf *dest_pixbuf,
else if (need_composite && use_simple)
gdk_pixbuf_composite_color (src_pixbuf, dest_pixbuf,
cx, cy,
- MIN (pwidth, field_geom->width - cx),
+ MIN (pwidth, field_geom->width - cx),
MIN (pheight, field_geom->height - cy),
cx, cy,
1.0, 1.0,
diff --git a/typing-break/main.c b/typing-break/main.c
index 74df85bc..145d1c5d 100644
--- a/typing-break/main.c
+++ b/typing-break/main.c
@@ -38,12 +38,12 @@ have_tray (void)
Screen *xscreen = DefaultScreenOfDisplay (gdk_x11_display_get_xdisplay(gdk_display_get_default()));
Atom selection_atom;
char *selection_atom_name;
-
+
selection_atom_name = g_strdup_printf ("_NET_SYSTEM_TRAY_S%d",
XScreenNumberOfScreen (xscreen));
selection_atom = gdk_x11_get_xatom_by_name (selection_atom_name);
g_free (selection_atom_name);
-
+
if (XGetSelectionOwner (DisplayOfScreen (xscreen), selection_atom)) {
return TRUE;
} else {
@@ -68,7 +68,7 @@ main (int argc, char *argv[])
GError *error = NULL;
gboolean retval;
- bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
@@ -76,7 +76,7 @@ main (int argc, char *argv[])
g_option_context_set_translation_domain (option_context, GETTEXT_PACKAGE);
g_option_context_add_main_entries (option_context, options, GETTEXT_PACKAGE);
g_option_context_add_group (option_context, gtk_get_option_group (TRUE));
-
+
retval = g_option_context_parse (option_context, &argc, &argv, &error);
g_option_context_free (option_context);
if (!retval) {
@@ -107,13 +107,13 @@ main (int argc, char *argv[])
"on your panel. You can add it by right-clicking on your "
"panel and choosing 'Add to panel', selecting 'Notification "
"area' and clicking 'Add'."));
-
+
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
#endif /* HAVE_APP_INDICATOR */
-
+
drwright_new ();
gtk_main ();