Skip to content

Commit

Permalink
Use correct function signaure for saving plugin data; will no longer …
Browse files Browse the repository at this point in the history
…crash when intermediately saving the config; should also fix bugs 6734 and 11554.
  • Loading branch information
timystery committed Apr 6, 2017
1 parent 72886a8 commit f9904f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/configuration.h
Expand Up @@ -41,9 +41,10 @@ gint get_Id_from_address (gint chipnumber, gint addr_chipfeature,

/**
* Write the configuration, e.g., when exiting the plugin.
* @param ptr_panelplugin: pointer to panel plugin structure
* @param ptr_sensors: pointer to sensors structure
*/
void sensors_write_config (t_sensors *ptr_sensors);
void sensors_write_config (XfcePanelPlugin *plugin,t_sensors *ptr_sensors);


/**
Expand Down
2 changes: 1 addition & 1 deletion lib/configuration.c
Expand Up @@ -74,7 +74,7 @@ get_Id_from_address (gint idx_chip, gint addr_chipfeature, t_sensors *ptr_sensor

/* -------------------------------------------------------------------------- */
void
sensors_write_config (t_sensors *ptr_sensors)
sensors_write_config (XfcePanelPlugin *plugin,t_sensors *ptr_sensors)
{
XfceRc *ptr_xfcerc;
gchar *str_file, *str_tmp, str_chip[8], str_feature[20];
Expand Down
2 changes: 1 addition & 1 deletion panel-plugin/sensors-plugin.c
Expand Up @@ -2414,7 +2414,7 @@ on_optionsDialog_response (GtkWidget *dlg, int response, t_sensors_dialog *sd)
sd->sensors->plugin_config_file = xfce_panel_plugin_save_location (sd->sensors->plugin, TRUE);

if (sd->sensors->plugin_config_file)
sensors_write_config (sd->sensors);
sensors_write_config (sd->sensors->plugin, sd->sensors);
}
gtk_window_get_size ( GTK_WINDOW(dlg), &(sd->sensors->preferred_width), &(sd->sensors->preferred_height));
gtk_widget_destroy (sd->dialog);
Expand Down

0 comments on commit f9904f1

Please sign in to comment.