<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Psensor has not been build with Unity Launcher support</property>
<property name="margin_left">4</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Psensor has not been build with NVCtrl support</property>
<property name="margin_left">14</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Psensor has not been build with ATI ADL support</property>
<property name="margin_left">14</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Psensor has not been build with gtop2 support</property>
<property name="margin_left">14</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Psensor has not been build with libatasmart support</property>
<property name="margin_left">14</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Psensor has not been build with udisks2 support</property>
<property name="margin_left">14</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Psensor has not been build with AppIndicator support</property>
<property name="margin_left">4</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Psensor has not been build with AppIndicator support</property>
<property name="margin_left">4</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
pthread_t thread;
int optc, cmdok, opti, new_instance, ret;
char *url = NULL;
- GApplication *app;
+ GtkApplication *app;
program_name = argv[0];
log_init();
- app = g_application_new("wpitchoune.psensor", 0);
+ app = gtk_application_new("wpitchoune.psensor", G_APPLICATION_IS_SERVICE);
- g_application_register(app, NULL, NULL);
+ printf("%d\n",g_application_register(G_APPLICATION(app), NULL, NULL));
- if (!new_instance && g_application_get_is_remote(app)) {
- g_application_activate(app);
+ if (!new_instance && g_application_get_is_remote(G_APPLICATION(app))) {
+ g_application_activate(G_APPLICATION(app));
log_warn(_("A Psensor instance already exists."));
exit(EXIT_SUCCESS);
}
gtk_toggle_button_set_active(w_enable_launcher_counter,
!cfg->unity_launcher_count_disabled);
+#if !HAVE_APPINDICATOR && !HAVE_APPINDICATOR_029
+ gtk_widget_set_sensitive(GTK_WIDGET(w_enable_launcher_counter), FALSE);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_enable_launcher_counter), TRUE);
+#else
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_enable_launcher_counter),
+ FALSE);
+#endif
+
w_smooth_curves = GTK_TOGGLE_BUTTON
(gtk_builder_get_object(builder, "graph_smooth_curves"));
gtk_toggle_button_set_active(w_smooth_curves,
"nvctrl"));
#if !HAVE_NVIDIA
gtk_widget_set_sensitive(GTK_WIDGET(w_nvctrl), 0);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_nvctrl), TRUE);
+#else
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_nvctrl), FALSE);
#endif
gtk_toggle_button_set_active(w_nvctrl, config_is_nvctrl_enabled());
"atiadlsdk"));
#if !HAVE_LIBATIADL
gtk_widget_set_sensitive(GTK_WIDGET(w_atiadlsdk), 0);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_atiadlsdk), TRUE);
+#else
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_atiadlsdk), FALSE);
#endif
gtk_toggle_button_set_active(w_atiadlsdk,
config_is_atiadlsdk_enabled());
"gtop2"));
#if !HAVE_GTOP
gtk_widget_set_sensitive(GTK_WIDGET(w_gtop2), 0);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_gtop2), TRUE);
+#else
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_gtop2), FALSE);
#endif
gtk_toggle_button_set_active(w_gtop2, config_is_gtop2_enabled());
"libatasmart"));
#if !HAVE_ATASMART
gtk_widget_set_sensitive(GTK_WIDGET(w_libatasmart), 0);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_libatasmart), TRUE);
+#else
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_libatasmart), FALSE);
#endif
gtk_toggle_button_set_active(w_libatasmart,
config_is_libatasmart_enabled());
"udisks2"));
#if !HAVE_LIBUDISKS2
gtk_widget_set_sensitive(GTK_WIDGET(w_udisks2), 0);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_udisks2), TRUE);
+#else
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_udisks2), FALSE);
#endif
gtk_toggle_button_set_active(w_udisks2, config_is_udisks2_enabled());
w_appindicator_label_enabled = GTK_TOGGLE_BUTTON
(gtk_builder_get_object(builder, "indicator_label_checkbox"));
+
+#if !HAVE_APPINDICATOR && !HAVE_APPINDICATOR_029
+ gtk_widget_set_sensitive(GTK_WIDGET(w_appindicator_label_enabled),
+ FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(w_appindicator_enabled), FALSE);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_appindicator_label_enabled),
+ TRUE);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_appindicator_enabled), TRUE);
+#else
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_appindicator_label_enabled),
+ FALSE);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_appindicator_enabled), FALSE);
+#endif
+
gtk_toggle_button_set_active(w_alarm, p->alarm_enabled);
gtk_spin_button_set_value(w_high_threshold, p->alarm_high_threshold);
gtk_spin_button_set_value(w_low_threshold, p->alarm_low_threshold);