mirror of https://github.com/daleclack/My_GtkUi
Fix timer
This commit is contained in:
parent
eec32edb4d
commit
dc5ad08c15
|
@ -8,13 +8,13 @@
|
|||
/* @import url("resource://org/gtk/daleclack/reset.css"); */
|
||||
|
||||
.finder_box{
|
||||
background-color:alpha(gray,0.7);
|
||||
background-color:alpha(white,0.7);
|
||||
}
|
||||
|
||||
.finder_separator{
|
||||
background-color:alpha(gray,0.7);
|
||||
background-color:alpha(white ,0.7);
|
||||
}
|
||||
|
||||
label{
|
||||
color:black;
|
||||
color:rgb(35, 27, 27);
|
||||
}
|
|
@ -106,6 +106,12 @@ static void my_dock_init(MyDock *self)
|
|||
self->finder = my_finder_new(GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
gtk_box_append(GTK_BOX(self->finder_box), self->finder);
|
||||
|
||||
GtkCssProvider *provider = gtk_css_provider_new();
|
||||
gtk_css_provider_load_from_resource(provider, "/org/gtk/daleclack/style.css");
|
||||
gtk_widget_add_css_class(self->finder, ".finder_box");
|
||||
gtk_style_context_add_provider_for_display(gtk_widget_get_display(self->finder),
|
||||
GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
|
||||
|
||||
// Link Signals
|
||||
g_signal_connect(self->btnlaunch, "clicked", G_CALLBACK(btnlaunch_clicked), self);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ static gboolean timeout_func(gpointer data)
|
|||
struct tm *local;
|
||||
local = localtime(&t);
|
||||
char time_data[57];
|
||||
snprintf(time_data, sizeof(time_data), "%d/%d/%d %d:%d:%d", local->tm_year + 1900,
|
||||
snprintf(time_data, sizeof(time_data), "%04d/%02d/%02d %02d:%02d:%02d", local->tm_year + 1900,
|
||||
local->tm_mon + 1, local->tm_mday, local->tm_hour, local->tm_min, local->tm_sec);
|
||||
gtk_label_set_label(GTK_LABEL(data), time_data);
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue