summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessx-status/applet.c1
-rw-r--r--battstat/battstat-upower.c21
-rw-r--r--charpick/charpick.c13
-rw-r--r--cpufreq/src/cpufreq-applet.c1
-rw-r--r--mateweather/mateweather-dialog.c8
-rw-r--r--mateweather/mateweather-pref.c2
-rw-r--r--multiload/linux-proc.c4
-rw-r--r--multiload/load-graph.c1
-rw-r--r--netspeed/src/netspeed.c2
9 files changed, 14 insertions, 39 deletions
diff --git a/accessx-status/applet.c b/accessx-status/applet.c
index 0b75eccf..f38456fb 100644
--- a/accessx-status/applet.c
+++ b/accessx-status/applet.c
@@ -403,7 +403,6 @@ static GdkPixbuf* accessx_status_applet_get_glyph_pixbuf(GtkWidget* widget, GdkP
static cairo_surface_t* accessx_status_applet_altgraph_image(AccessxStatusApplet *sapplet, GtkStateFlags state)
{
GtkIconTheme *icon_theme;
- cairo_t* cr;
GdkPixbuf* pixbuf;
GdkPixbuf* glyph_pixbuf;
GdkPixbuf* icon_base;
diff --git a/battstat/battstat-upower.c b/battstat/battstat-upower.c
index 67779f8c..c22d50c7 100644
--- a/battstat/battstat-upower.c
+++ b/battstat/battstat-upower.c
@@ -79,13 +79,7 @@ device_removed_cb (UpClient *client, const gchar *object_path, gpointer user_dat
char *
battstat_upower_initialise (void (*callback) (void))
{
- char *error_str;
- int i, num;
-
status_updated_callback = callback;
-#if UP_CHECK_VERSION (0, 99, 0)
- GPtrArray *devices;
-#endif
if( upc != NULL )
return g_strdup( "Already initialised!" );
@@ -93,18 +87,18 @@ battstat_upower_initialise (void (*callback) (void))
if( (upc = up_client_new() ) == NULL )
goto error_out;
- GCancellable *cancellable = g_cancellable_new();
- GError *gerror;
-
#if UP_CHECK_VERSION(0, 99, 0)
+ GPtrArray *devices;
devices = up_client_get_devices(upc);
if (!devices) {
goto error_shutdownclient;
}
g_ptr_array_unref(devices);
#else
- if (! up_client_enumerate_devices_sync( upc, cancellable, &gerror ) ) {
- sprintf(error_str, "Unable to enumerate upower devices: %s\n", gerror->message);
+ GError *gerror;
+ GCancellable *cancellable = g_cancellable_new ();
+ if (! up_client_enumerate_devices_sync (upc, cancellable, &gerror)) {
+ g_debug ("Unable to enumerate upower devices: %s\n", gerror->message);
goto error_shutdownclient;
}
#endif
@@ -199,9 +193,6 @@ battstat_upower_get_battery_info( BatteryStatus *status )
*/
int charging = 0;
- /* A list iterator. */
- GSList *item;
-
/* For each physical battery bay... */
int i;
for( i = 0; i < devices->len; i++ )
@@ -211,7 +202,7 @@ battstat_upower_get_battery_info( BatteryStatus *status )
int type, state;
double current_charge, full_capacity, rate;
gint64 time_to_full, time_to_empty;
-
+
g_object_get( upd,
"kind", &type,
"state", &state,
diff --git a/charpick/charpick.c b/charpick/charpick.c
index 6d9d4a19..97d36802 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -274,12 +274,11 @@ static void
menuitem_activated (GtkMenuItem *menuitem, charpick_data *curr_data)
{
gchar *string;
- MatePanelApplet *applet = MATE_PANEL_APPLET (curr_data->applet);
-
+
string = g_object_get_data (G_OBJECT (menuitem), "string");
if (g_ascii_strcasecmp (curr_data->charlist, string) == 0)
return;
-
+
curr_data->charlist = string;
build_table (curr_data);
if (g_settings_is_writable (curr_data->settings, "current-list"))
@@ -642,10 +641,9 @@ save_chartable (charpick_data *curr_data)
static void
get_chartable (charpick_data *curr_data)
{
- MatePanelApplet *applet = MATE_PANEL_APPLET (curr_data->applet);
gint i, n;
GList *value = NULL;
-
+
value = mate_panel_applet_settings_get_glist (curr_data->settings, "chartable");
if (value) {
curr_data->chartable = value;
@@ -654,16 +652,13 @@ get_chartable (charpick_data *curr_data)
n = G_N_ELEMENTS (chartable);
for (i=0; i<n; i++) {
gchar *string;
-
+
string = g_ucs4_to_utf8 (chartable[i], -1, NULL, NULL, NULL);
curr_data->chartable = g_list_append (curr_data->chartable, string);
-
}
if ( ! g_settings_is_writable (curr_data->settings, "chartable"))
save_chartable (curr_data);
}
-
-
}
static const GtkActionEntry charpick_applet_menu_actions [] = {
diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c
index ae8de767..bee5ddef 100644
--- a/cpufreq/src/cpufreq-applet.c
+++ b/cpufreq/src/cpufreq-applet.c
@@ -807,7 +807,6 @@ cpufreq_applet_setup (CPUFreqApplet *applet)
GtkActionGroup *action_group;
gchar *ui_path;
AtkObject *atk_obj;
- gchar *prefs_key;
GSettings *settings;
g_set_application_name (_("CPU Frequency Scaling Monitor"));
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c
index b6a67b14..b84f94c8 100644
--- a/mateweather/mateweather-dialog.c
+++ b/mateweather/mateweather-dialog.c
@@ -60,14 +60,14 @@ G_DEFINE_TYPE_WITH_PRIVATE (MateWeatherDialog, mateweather_dialog, GTK_TYPE_DIAL
static void mateweather_dialog_save_geometry(MateWeatherDialog* dialog)
{
+#if 0
GSettings* settings;
int w, h;
- settings = dialog->priv->applet->settings;
+ gtk_window_get_size (GTK_WINDOW (dialog), &w, &h);
- gtk_window_get_size(GTK_WINDOW(dialog), &w, &h);
+ settings = dialog->priv->applet->settings;
-#if 0
/* FIXME those keys are not in org.mate.weather! */
g_settings_set_int (settings, "dialog-width", w);
g_settings_set_int (settings, "dialog-height", h);
@@ -76,12 +76,12 @@ static void mateweather_dialog_save_geometry(MateWeatherDialog* dialog)
static void mateweather_dialog_load_geometry(MateWeatherDialog* dialog)
{
+#if 0
GSettings* settings;
int w, h;
settings = dialog->priv->applet->settings;
-#if 0
/* FIXME those keys are not in org.mate.weather! */
w = g_settings_get_int (settings, "dialog-width");
h = g_settings_get_int (settings, "dialog-height");
diff --git a/mateweather/mateweather-pref.c b/mateweather/mateweather-pref.c
index a03afca8..c7f54f81 100644
--- a/mateweather/mateweather-pref.c
+++ b/mateweather/mateweather-pref.c
@@ -263,11 +263,9 @@ static gboolean compare_location(GtkTreeModel* model, GtkTreePath* path, GtkTree
static void load_locations(MateWeatherPref* pref)
{
- MateWeatherApplet* gw_applet = pref->priv->applet;
GtkTreeView* tree = GTK_TREE_VIEW(pref->priv->tree);
GtkTreeViewColumn* column;
GtkCellRenderer* cell_renderer;
- WeatherLocation* current_location;
/* Add a column for the locations */
cell_renderer = gtk_cell_renderer_text_new();
diff --git a/multiload/linux-proc.c b/multiload/linux-proc.c
index 355fe040..db532b8c 100644
--- a/multiload/linux-proc.c
+++ b/multiload/linux-proc.c
@@ -296,8 +296,6 @@ GetSwap (int Maximum, int data [2], LoadGraph *g)
void
GetLoadAvg (int Maximum, int data [2], LoadGraph *g)
{
- float used;
-
glibtop_loadavg loadavg;
glibtop_get_loadavg (&loadavg);
@@ -380,7 +378,6 @@ GetNet (int Maximum, int data [4], LoadGraph *g)
for(i = 0; i < netlist.number; ++i)
{
- int index;
glibtop_netload netload;
glibtop_get_netload(&netload, devices[i]);
@@ -419,7 +416,6 @@ GetNet (int Maximum, int data [4], LoadGraph *g)
else
{
int delta[COUNT_TYPES];
- int max;
int total = 0;
for (i = 0; i < COUNT_TYPES; i++)
diff --git a/multiload/load-graph.c b/multiload/load-graph.c
index 5eb90e8f..9c2af5f5 100644
--- a/multiload/load-graph.c
+++ b/multiload/load-graph.c
@@ -106,7 +106,6 @@ load_graph_draw (LoadGraph *g)
}
//printf("max = %d ", maxnet);
guint level = 0;
- GdkRGBA grid_color;
if (maxnet > g->net_threshold3) {
g->net_threshold = g->net_threshold3;
level = 3;
diff --git a/netspeed/src/netspeed.c b/netspeed/src/netspeed.c
index ec774128..7779b77c 100644
--- a/netspeed/src/netspeed.c
+++ b/netspeed/src/netspeed.c
@@ -580,7 +580,6 @@ search_for_up_if(MateNetspeedApplet *applet)
{
const gchar *default_route;
GList *devices, *tmp;
- DevInfo info;
default_route = get_default_route();
@@ -1569,7 +1568,6 @@ mate_netspeed_applet_factory(MatePanelApplet *applet_widget, const gchar *iid, g
{
MateNetspeedApplet *applet;
int i;
- char* menu_string;
GtkIconTheme *icon_theme;
GtkWidget *spacer, *spacer_box;