[style] fix intentation and spaces befor and after *
This commit is contained in:
@@ -23,7 +23,7 @@ struct _TeleportApp
|
||||
G_DEFINE_TYPE(TeleportApp, teleport_app, GTK_TYPE_APPLICATION);
|
||||
|
||||
|
||||
static void create_user_notification (const char *file_name, const int file_size, const char * origin_device)
|
||||
static void create_user_notification (const char *file_name, const int file_size, const char *origin_device)
|
||||
{
|
||||
GNotification *notification = g_notification_new ("Teleport");
|
||||
g_notification_set_body (notification, g_strdup_printf("%s is sending %s (%d Byte)", origin_device, file_name, file_size));
|
||||
@@ -36,7 +36,7 @@ static void create_user_notification (const char *file_name, const int file_size
|
||||
g_object_unref (notification);
|
||||
}
|
||||
|
||||
static void create_finished_notification (const char *file_name, const int file_size, const char * origin_device)
|
||||
static void create_finished_notification (const char *file_name, const int file_size, const char *origin_device)
|
||||
{
|
||||
GNotification *notification = g_notification_new ("Teleport");
|
||||
g_notification_set_body (notification, g_strdup_printf("Transfer %s from %s is complete)", file_name, origin_device));
|
||||
@@ -50,24 +50,24 @@ static void create_finished_notification (const char *file_name, const int file_
|
||||
|
||||
|
||||
gboolean mainLoopAddPeerCallback (gpointer name) {
|
||||
update_remote_device_list(win, (char*)name);
|
||||
update_remote_device_list(win, (char *)name);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
gboolean mainLoopRemovePeerCallback (gpointer name) {
|
||||
update_remote_device_list_remove(win, (char*)name);
|
||||
update_remote_device_list_remove(win, (char *)name);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
void callback_add_peer(GObject * instance, char * name, TeleportAppWindow * win ) {
|
||||
void callback_add_peer(GObject *instance, char *name, TeleportAppWindow *win ) {
|
||||
g_idle_add(mainLoopAddPeerCallback, g_strdup(name));
|
||||
}
|
||||
|
||||
void callback_remove_peer(GObject * instance, char * name, TeleportAppWindow * win ) {
|
||||
void callback_remove_peer(GObject *instance, char *name, TeleportAppWindow *win ) {
|
||||
g_idle_add(mainLoopRemovePeerCallback, g_strdup(name));
|
||||
}
|
||||
|
||||
void callback_notify_user(GObject * instance, char * name, TeleportAppWindow * win ) {
|
||||
void callback_notify_user(GObject *instance, char *name, TeleportAppWindow *win ) {
|
||||
create_user_notification("icon.png", 2000, "Mark's laptop");
|
||||
}
|
||||
|
||||
@@ -149,5 +149,3 @@ teleport_app_new (void)
|
||||
"flags", G_APPLICATION_HANDLES_OPEN,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "server.h"
|
||||
|
||||
|
||||
GtkWidget* find_child(GtkWidget* , const gchar* );
|
||||
TeleportAppWindow* mainWin;
|
||||
GtkWidget *find_child(GtkWidget *, const gchar *);
|
||||
TeleportAppWindow *mainWin;
|
||||
|
||||
struct _TeleportAppWindow
|
||||
{
|
||||
@@ -45,7 +45,7 @@ teleport_app_window_init (TeleportAppWindow *win)
|
||||
}
|
||||
|
||||
static void
|
||||
open_file_picker(GtkButton * btn, GString* deviceName) {
|
||||
open_file_picker(GtkButton *btn, GString *deviceName) {
|
||||
GtkWidget *dialog;
|
||||
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
|
||||
gint res;
|
||||
@@ -75,7 +75,7 @@ open_file_picker(GtkButton * btn, GString* deviceName) {
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
void update_remote_device_list(TeleportAppWindow *win, char * name) {
|
||||
void update_remote_device_list(TeleportAppWindow *win, char *name) {
|
||||
TeleportAppWindowPrivate *priv;
|
||||
GtkBuilder *builder_remote_list;
|
||||
GtkWidget *row;
|
||||
@@ -100,7 +100,7 @@ void update_remote_device_list(TeleportAppWindow *win, char * name) {
|
||||
}
|
||||
|
||||
|
||||
void update_remote_device_list_remove(TeleportAppWindow *win, char * name) {
|
||||
void update_remote_device_list_remove(TeleportAppWindow *win, char *name) {
|
||||
TeleportAppWindowPrivate *priv;
|
||||
GtkWidget *box;
|
||||
GtkListBoxRow *remote_row;
|
||||
@@ -123,10 +123,10 @@ void update_remote_device_list_remove(TeleportAppWindow *win, char * name) {
|
||||
}
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
find_child(GtkWidget* parent, const gchar* name)
|
||||
GtkWidget *
|
||||
find_child(GtkWidget *parent, const gchar *name)
|
||||
{
|
||||
if (g_strcmp0(gtk_widget_get_name((GtkWidget*)parent), (gchar*)name) == 0) {
|
||||
if (g_strcmp0(gtk_widget_get_name((GtkWidget *)parent), (gchar *)name) == 0) {
|
||||
return parent;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ find_child(GtkWidget* parent, const gchar* name)
|
||||
if (GTK_IS_CONTAINER(parent)) {
|
||||
GList *children = gtk_container_get_children(GTK_CONTAINER(parent));
|
||||
while ((children = g_list_next(children)) != NULL) {
|
||||
GtkWidget* widget = find_child(children->data, name);
|
||||
GtkWidget *widget = find_child(children->data, name);
|
||||
if (widget != NULL) {
|
||||
return widget;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user