X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fui.c;h=fc5f5c38fee65b219567b88a71fea023c04b5b4b;hb=9dc8095432b3733157be0c01a41013e640a75f76;hp=c0a5cb673645474e763158e67348274e018e32b8;hpb=37afe949c5c7aff3abe6e030161c64c8603877b2;p=psensor.git diff --git a/src/ui.c b/src/ui.c index c0a5cb6..fc5f5c3 100644 --- a/src/ui.c +++ b/src/ui.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 jeanfi@gmail.com + * Copyright (C) 2010-2014 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -76,18 +76,25 @@ on_delete_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data) return TRUE; } -void ui_show_about_dialog() +void ui_show_about_dialog(void) { + static const char *const authors[] = { "jeanfi@gmail.com", NULL }; + gtk_show_about_dialog (NULL, + "authors", authors, "comments", _("Psensor is a GTK+ application for monitoring hardware " "sensors"), "copyright", - _("Copyright(c) 2010-2012\njeanfi@gmail.com"), + _("Copyright(c) 2010-2014 jeanfi@gmail.com"), +#if GTK_CHECK_VERSION(3, 12, 0) + "license-type", GTK_LICENSE_GPL_2_0, +#endif "logo-icon-name", "psensor", "program-name", "Psensor", "title", _("About Psensor"), + "translator-credits", _("translator-credits"), "version", VERSION, "website", PACKAGE_URL, "website-label", _("Psensor Homepage"), @@ -152,8 +159,7 @@ void ui_enable_alpha_channel(struct ui_psensor *ui) } } -static void -slog_enabled_cbk(GConfClient *client, guint id, GConfEntry *e, gpointer data) +static void slog_enabled_cbk(void *data) { struct ui_psensor *ui; struct psensor **sensors; @@ -192,7 +198,7 @@ void ui_window_create(struct ui_psensor *ui) if (!ok) { log_printf(LOG_ERR, error->message); g_error_free(error); - return ; + return; } window = GTK_WIDGET(gtk_builder_get_object(builder, "window")); @@ -203,7 +209,7 @@ void ui_window_create(struct ui_psensor *ui) cfg->window_x, cfg->window_y); - config_slog_enabled_notify_add(slog_enabled_cbk, ui); + config_set_slog_enabled_changed_cbk(slog_enabled_cbk, ui); gtk_window_set_default_size(GTK_WINDOW(window), cfg->window_w, @@ -343,11 +349,11 @@ static int cmp_sensors(const void *p1, const void *p2) return pos1 - pos2; } -struct psensor **ui_get_sensors_ordered_by_position(const struct ui_psensor *ui) +struct psensor **ui_get_sensors_ordered_by_position(struct psensor **sensors) { struct psensor **result; - result = psensor_list_copy(ui->sensors); + result = psensor_list_copy(sensors); qsort(result, psensor_list_size(result), sizeof(struct psensor *),