projects/pk-update-icon

changeset 39:f6edbee6441f

Stylistic fixes
author Guido Berhoerster <gber@opensuse.org>
date Fri Feb 07 21:56:46 2014 +0100 (2014-02-07)
parents db09b66c3853
children c390b3638e6a
files pkui-backend.c pkui-backend.h pkui-icon.c pkui-icon.h
line diff
     1.1 --- a/pkui-backend.c	Fri Feb 07 18:31:52 2014 +0100
     1.2 +++ b/pkui-backend.c	Fri Feb 07 21:56:46 2014 +0100
     1.3 @@ -28,17 +28,17 @@
     1.4  
     1.5  struct _PkuiBackendPrivate
     1.6  {
     1.7 -	PkuiBackend *backend;
     1.8 -	PkClient *pk_client;
     1.9 -	guint periodic_check_id;
    1.10 -	guint updates_normal;
    1.11 -	guint updates_important;
    1.12 -	guint previous_updates_normal;
    1.13 -	guint previous_updates_important;
    1.14 -	guint startup_delay;
    1.15 -	guint check_interval;
    1.16 -	gint64 last_check;
    1.17 -	gboolean inhibit_check;
    1.18 +	PkuiBackend	*backend;
    1.19 +	PkClient	*pk_client;
    1.20 +	guint		periodic_check_id;
    1.21 +	guint		updates_normal;
    1.22 +	guint		updates_important;
    1.23 +	guint		previous_updates_normal;
    1.24 +	guint		previous_updates_important;
    1.25 +	guint		startup_delay;
    1.26 +	guint		check_interval;
    1.27 +	gint64		last_check;
    1.28 +	gboolean	inhibit_check;
    1.29  };
    1.30  
    1.31  enum
    1.32 @@ -61,7 +61,7 @@
    1.33  
    1.34  static guint	pkui_backend_signals[LAST_SIGNAL] = { 0 };
    1.35  
    1.36 -static gboolean periodic_check(gpointer data);
    1.37 +static gboolean	periodic_check(gpointer data);
    1.38  
    1.39  static void
    1.40  pkui_backend_set_property(GObject *object, guint property_id,
     2.1 --- a/pkui-backend.h	Fri Feb 07 18:31:52 2014 +0100
     2.2 +++ b/pkui-backend.h	Fri Feb 07 21:56:46 2014 +0100
     2.3 @@ -44,9 +44,8 @@
     2.4  
     2.5  struct _PkuiBackend
     2.6  {
     2.7 -	GObject		parent_instance;
     2.8 -
     2.9 -	PkuiBackendPrivate *priv;
    2.10 +	GObject			parent_instance;
    2.11 +	PkuiBackendPrivate	*priv;
    2.12  };
    2.13  
    2.14  struct _PkuiBackendClass
    2.15 @@ -54,15 +53,17 @@
    2.16  	GObjectClass	parent_class;
    2.17  };
    2.18  
    2.19 -PkuiBackend *pkui_backend_new(guint startup_delay, guint interval);
    2.20 -guint pkui_backend_get_updates_normal(PkuiBackend *self);
    2.21 -guint pkui_backend_get_updates_important(PkuiBackend *self);
    2.22 -void pkui_backend_set_inhibit_check(PkuiBackend *self, gboolean inhibit_check);
    2.23 -gboolean pkui_backend_get_inhibit_check(PkuiBackend *self);
    2.24 -void pkui_backend_set_check_interval(PkuiBackend *self, guint check_interval);
    2.25 -guint pkui_backend_get_check_interval(PkuiBackend *self);
    2.26 -guint pkui_backend_get_startup_interval(PkuiBackend *self);
    2.27 -void pkui_backend_check_now(PkuiBackend *self);
    2.28 +PkuiBackend	*pkui_backend_new(guint startup_delay, guint interval);
    2.29 +guint		pkui_backend_get_updates_normal(PkuiBackend *self);
    2.30 +guint		pkui_backend_get_updates_important(PkuiBackend *self);
    2.31 +void		pkui_backend_set_inhibit_check(PkuiBackend *self,
    2.32 +    gboolean inhibit_check);
    2.33 +gboolean	pkui_backend_get_inhibit_check(PkuiBackend *self);
    2.34 +void		pkui_backend_set_check_interval(PkuiBackend *self,
    2.35 +    guint check_interval);
    2.36 +guint		pkui_backend_get_check_interval(PkuiBackend *self);
    2.37 +guint		pkui_backend_get_startup_interval(PkuiBackend *self);
    2.38 +void		pkui_backend_check_now(PkuiBackend *self);
    2.39  
    2.40  G_END_DECLS
    2.41  
     3.1 --- a/pkui-icon.c	Fri Feb 07 18:31:52 2014 +0100
     3.2 +++ b/pkui-icon.c	Fri Feb 07 21:56:46 2014 +0100
     3.3 @@ -39,13 +39,13 @@
     3.4  	NotifyNotification *notification;
     3.5  };
     3.6  
     3.7 -static GtkWidget* icon_popup_menu_create(PkuiIcon *self);
     3.8 -static void icon_popup_menu_popup(GtkStatusIcon *status_icon, guint button,
     3.9 +static GtkWidget*	icon_popup_menu_create(PkuiIcon *self);
    3.10 +static void	icon_popup_menu_popup(GtkStatusIcon *status_icon, guint button,
    3.11      guint activate_time, gpointer user_data);
    3.12 -static void icon_activated(GtkStatusIcon *status_icon, gpointer user_data);
    3.13 -static void hide_notification(PkuiIcon *self);
    3.14 -static void backend_state_changed(PkuiBackend *backend, gpointer user_data);
    3.15 -static void update_viewer_exited(GPid pid, gint status, gpointer user_data);
    3.16 +static void	icon_activated(GtkStatusIcon *status_icon, gpointer user_data);
    3.17 +static void	hide_notification(PkuiIcon *self);
    3.18 +static void	backend_state_changed(PkuiBackend *backend, gpointer user_data);
    3.19 +static void	update_viewer_exited(GPid pid, gint status, gpointer user_data);
    3.20  
    3.21  static void
    3.22  pkui_icon_finalize(GObject *gobject)
    3.23 @@ -125,31 +125,32 @@
    3.24  static void
    3.25  about_dialog_show(GtkMenuItem *item, gpointer user_data)
    3.26  {
    3.27 -	static const gchar *copyright = "Copyright \xc2\xa9 2011 Guido "
    3.28 +	static const gchar	*copyright = "Copyright \xc2\xa9 2011 Guido "
    3.29  	    "Berhoerster\nCopyright \xc2\xa9 2011 Pavol Rusnak\n";
    3.30 -	static const gchar *authors[3] = {
    3.31 +	static const gchar	*authors[3] = {
    3.32  	    "Guido Berhoerster <gber@opensuse.org>",
    3.33  	    "Pavol Rusnak <stick@gk2.sk>",
    3.34  	    NULL
    3.35  	};
    3.36 -	static const gchar *documenters[2] = {
    3.37 +	static const gchar	*documenters[2] = {
    3.38  	    "Guido Berhoerster <gber@opensuse.org>",
    3.39  	    NULL
    3.40  	};
    3.41 -	static const gchar *license =
    3.42 -	    "Licensed under the GNU General Public License Version 2\n\nThis "
    3.43 -	    "program is free software; you can redistribute it and/or modify it"
    3.44 -	    " under the terms of the GNU General Public License as published by"
    3.45 -	    " the Free Software Foundation; either version 2 of the License, or"
    3.46 -	    " (at your option) any later version.\n\nThis program is "
    3.47 -	    "distributed in the hope that it will be useful, but WITHOUT ANY "
    3.48 -	    "WARRANTY; without even the implied warranty of MERCHANTABILITY or "
    3.49 -	    "FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public "
    3.50 -	    "License for more details.\n\nYou should have received a copy of "
    3.51 -	    "the GNU General Public License along with this program; if not, "
    3.52 -	    "write to the Free Software Foundation, Inc., 51 Franklin Street, "
    3.53 -	    "Fifth Floor, Boston, MA 02110-1301 USA.";
    3.54 -	const gchar *translators = _("translators");
    3.55 +	static const gchar	*license =
    3.56 +	    "Licensed under the GNU General Public License Version 2\n\n"
    3.57 +	    "This program is free software; you can redistribute it and/or "
    3.58 +	    "modify it under the terms of the GNU General Public License as "
    3.59 +	    "published by the Free Software Foundation; either version 2 of "
    3.60 +	    "the License, or (at your option) any later version.\n\n"
    3.61 +	    "This program is distributed in the hope that it will be useful, "
    3.62 +	    "but WITHOUT ANY WARRANTY; without even the implied warranty of "
    3.63 +	    "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU "
    3.64 +	    "General Public License for more details.\n\n"
    3.65 +	    "You should have received a copy of the GNU General Public License "
    3.66 +	    "along with this program; if not, write to the Free Software "
    3.67 +	    "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, "
    3.68 +	    "MA 02110-1301 USA.";
    3.69 +	const gchar	*translators = _("translators");
    3.70  
    3.71  	if (strcmp(translators, "translators") == 0)
    3.72  	    translators = NULL;
    3.73 @@ -202,7 +203,7 @@
    3.74  icon_popup_menu_popup(GtkStatusIcon *status_icon, guint button,
    3.75      guint activate_time, gpointer user_data)
    3.76  {
    3.77 -	PkuiIcon *self = PKUI_ICON(user_data);
    3.78 +	PkuiIcon	*self = PKUI_ICON(user_data);
    3.79  
    3.80  	gtk_menu_popup(GTK_MENU(self->priv->status_icon_popup_menu), NULL, NULL,
    3.81  	    NULL, NULL, button, activate_time);
    3.82 @@ -212,7 +213,7 @@
    3.83  notification_handle_action(NotifyNotification *notification, gchar *action,
    3.84      gpointer user_data)
    3.85  {
    3.86 -	PkuiIcon *self = PKUI_ICON(user_data);
    3.87 +	PkuiIcon	*self = PKUI_ICON(user_data);
    3.88  
    3.89  	if (strcmp(action, "install-updates") == 0)
    3.90  		exec_update_viewer(self);
    3.91 @@ -222,13 +223,13 @@
    3.92  update_notification(PkuiIcon *self, guint updates_normal,
    3.93      guint updates_important)
    3.94  {
    3.95 -	gchar *message;
    3.96 -	gchar *title = updates_important ?
    3.97 +	gchar	*message;
    3.98 +	gchar	*title = updates_important ?
    3.99  	    ngettext("Important Software Update", "Important Software Updates",
   3.100  	    updates_important + updates_normal) :
   3.101  	    ngettext("Software Update", "Software Updates", updates_important +
   3.102  	    updates_normal);
   3.103 -	gchar *icon = updates_important ? "software-update-urgent" :
   3.104 +	gchar	*icon = updates_important ? "software-update-urgent" :
   3.105  	    "software-update-available";
   3.106  
   3.107  	if (updates_important > 0)
     4.1 --- a/pkui-icon.h	Fri Feb 07 18:31:52 2014 +0100
     4.2 +++ b/pkui-icon.h	Fri Feb 07 21:56:46 2014 +0100
     4.3 @@ -44,16 +44,16 @@
     4.4  
     4.5  struct _PkuiIcon
     4.6  {
     4.7 -	GObject parent_instance;
     4.8 -	PkuiIconPrivate *priv;
     4.9 +	GObject		parent_instance;
    4.10 +	PkuiIconPrivate	*priv;
    4.11  };
    4.12  
    4.13  struct _PkuiIconClass
    4.14  {
    4.15 -	GObjectClass parent_class;
    4.16 +	GObjectClass	parent_class;
    4.17  };
    4.18  
    4.19 -PkuiIcon *pkui_icon_new(guint startup_delay, guint check_interval);
    4.20 +PkuiIcon	*pkui_icon_new(guint startup_delay, guint check_interval);
    4.21  
    4.22  G_END_DECLS
    4.23