summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-06-22 10:44:09 +0200
committerrbuj <[email protected]>2019-06-24 11:37:02 +0200
commit5f299dbf83d7d8f49c9e73f8c2cec9a4cce42cfb (patch)
treef9cb9812c4f7755116708ea0a6fa741a7f9d976a
parent39028e317750bcc4c81d762c25f2c88f5c8f3f56 (diff)
downloadmate-control-center-5f299dbf83d7d8f49c9e73f8c2cec9a4cce42cfb.tar.bz2
mate-control-center-5f299dbf83d7d8f49c9e73f8c2cec9a4cce42cfb.tar.xz
time-admin: Don't set font size/color for regular controls
Themes and Appearance
-rw-r--r--capplets/time-admin/src/main.c14
-rw-r--r--capplets/time-admin/src/time-share.c27
-rw-r--r--capplets/time-admin/src/time-share.h5
3 files changed, 10 insertions, 36 deletions
diff --git a/capplets/time-admin/src/main.c b/capplets/time-admin/src/main.c
index fb9e87a2..6a2f2028 100644
--- a/capplets/time-admin/src/main.c
+++ b/capplets/time-admin/src/main.c
@@ -218,9 +218,8 @@ static GtkWidget * TimeZoneAndNtp(TimeAdmin *ta)
table = gtk_grid_new();
gtk_grid_set_column_homogeneous(GTK_GRID(table),TRUE);
- TimeZoneLabel = gtk_label_new(NULL);
+ TimeZoneLabel = gtk_label_new (_("Time Zone:"));
gtk_widget_set_halign(TimeZoneLabel,GTK_ALIGN_START);
- SetLableFontType(TimeZoneLabel,11,_("Time Zone:"));
gtk_grid_attach(GTK_GRID(table) ,TimeZoneLabel, 0 , 0 , 1 , 1);
SetupTimezoneDialog(ta);
@@ -234,9 +233,8 @@ static GtkWidget * TimeZoneAndNtp(TimeAdmin *ta)
gtk_grid_attach(GTK_GRID(table) ,ta->TimeZoneButton,1 , 0 , 3 , 1);
- NtpSyncLabel = gtk_label_new(NULL);
+ NtpSyncLabel = gtk_label_new (_("Ntp Sync:"));
gtk_widget_set_halign(NtpSyncLabel,GTK_ALIGN_START);
- SetLableFontType(NtpSyncLabel,11,_("Ntp Sync:"));
gtk_grid_attach(GTK_GRID(table) ,NtpSyncLabel, 0 , 1 , 1 , 1);
ta->NtpSyncSwitch = gtk_switch_new();
@@ -286,8 +284,7 @@ static GtkWidget *SetClock(TimeAdmin *ta)
table = gtk_grid_new();
gtk_grid_set_column_homogeneous(GTK_GRID(table),TRUE);
- TimeLabel = gtk_label_new(NULL);
- SetLableFontType(TimeLabel,13,_("Set Time"));
+ TimeLabel = gtk_label_new (_("Set Time"));
gtk_widget_set_halign(TimeLabel,GTK_ALIGN_CENTER);
gtk_widget_set_valign(TimeLabel,GTK_ALIGN_START);
gtk_widget_set_hexpand(TimeLabel,FALSE);
@@ -322,9 +319,8 @@ static GtkWidget *SetDate(TimeAdmin *ta)
table = gtk_grid_new();
gtk_grid_set_column_homogeneous (GTK_GRID(table), TRUE);
- DateLabel = gtk_label_new (NULL);
- SetLableFontType (DateLabel, 13, _("Set Date"));
- gtk_grid_attach (GTK_GRID(table), DateLabel, 1, 0, 2, 2);
+ DateLabel = gtk_label_new (_("Set Date"));
+ gtk_grid_attach(GTK_GRID(table) ,DateLabel, 1 , 0 , 2 , 2);
LocalTime = GetCurrentTime ();
ta->Calendar = gtk_calendar_new ();
diff --git a/capplets/time-admin/src/time-share.c b/capplets/time-admin/src/time-share.c
index 1bbea7d1..9e19ee9d 100644
--- a/capplets/time-admin/src/time-share.c
+++ b/capplets/time-admin/src/time-share.c
@@ -91,25 +91,15 @@ int MessageReport(const char *Title,const char *Msg,int nType)
break;
}
- gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(dialog),
- TYPEMSG,
- Msg);
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
+ "%s", Msg);
gtk_window_set_title(GTK_WINDOW(dialog),("Message"));
nRet = gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
return nRet;
}
-void SetLableFontType(GtkWidget *Lable,int FontSzie,const char *Word)
-{
- char LableTypeBuf[200] = { 0 };
-
- sprintf(LableTypeBuf,
- "<span font_desc=\'%d\'>%s</span>",
- FontSzie,Word);
- gtk_label_set_markup(GTK_LABEL(Lable),LableTypeBuf);
-}
void QuitApp(TimeAdmin *ta)
{
if(ta->UpdateTimeId > 0)
@@ -124,15 +114,8 @@ void QuitApp(TimeAdmin *ta)
gtk_main_quit();
}
-void SetTooltip(GtkWidget*box,gboolean mode)
+void SetTooltip(GtkWidget *box, gboolean mode)
{
- if(!mode)
- {
- gtk_widget_set_tooltip_markup(box,
- _("Network time synchronization has been set up. Manual time/date setting is disabled."));
- }
- else
- {
- gtk_widget_set_tooltip_markup(box,NULL);
- }
+ gchar *text = mode ? NULL : _("Network time synchronization has been set up. Manual time/date setting is disabled.");
+ gtk_widget_set_tooltip_text (box, text);
}
diff --git a/capplets/time-admin/src/time-share.h b/capplets/time-admin/src/time-share.h
index e4391bf2..1a842e1c 100644
--- a/capplets/time-admin/src/time-share.h
+++ b/capplets/time-admin/src/time-share.h
@@ -33,7 +33,6 @@
#include <libintl.h>
#include <gio/gio.h>
-#define TYPEMSG "<span foreground='red'font_desc='13'>%s </span>"
#define ERROR 1
#define WARING 2
#define INFOR 3
@@ -77,10 +76,6 @@ int MessageReport (const char *Title,
const char *Msg,
int nType);
-void SetLableFontType (GtkWidget *Lable,
- int FontSzie,
- const char *Word);
-
void QuitApp (TimeAdmin *ta);
void SetTooltip (GtkWidget *box,