diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gtk.c | 5 | ||||
-rw-r--r-- | src/server/gtklayout.ui | 119 | ||||
-rw-r--r-- | src/server/gtklayout_flash.ui | 2 |
3 files changed, 99 insertions, 27 deletions
diff --git a/src/server/gtk.c b/src/server/gtk.c index 0606270..419a3cb 100644 --- a/src/server/gtk.c +++ b/src/server/gtk.c @@ -41,6 +41,7 @@ struct gtkui { GObject *show_more; GObject *show_less; GObject *ticker; + GObject *statusimg; GError *error; int showmore; }; @@ -103,6 +104,7 @@ int gtkui_init(int *argc, char ***argv, int nd, struct timespec period) gtkui.show_more = gtk_builder_get_object(gtkui.builder, "show_more"); gtkui.show_less = gtk_builder_get_object(gtkui.builder, "show_less"); gtkui.ticker = gtk_builder_get_object(gtkui.builder, "ticker"); + gtkui.statusimg = gtk_builder_get_object(gtkui.builder, "statusimg"); gtk_builder_connect_signals(gtkui.builder, NULL); g_object_unref(G_OBJECT(gtkui.builder)); gtkui.builder = NULL; @@ -143,8 +145,11 @@ static int gtkui_update(void *data) gtk_label_set_text(GTK_LABEL(gtkui.resistance), textbuf); sprintf(textbuf, "%.3fV", state.voltage); gtk_label_set_text(GTK_LABEL(gtkui.voltage), textbuf); + statechange ? statechange : + gtk_image_set_from_icon_name(GTK_IMAGE(gtkui.statusimg), "gtk-media-play", GTK_ICON_SIZE_SMALL_TOOLBAR); statechange = 1; } else if (*ret == DEAD && statechange) { + gtk_image_set_from_icon_name(GTK_IMAGE(gtkui.statusimg), "gtk-media-pause", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_label_set_text(GTK_LABEL(gtkui.tempvalue), waitmsg); gtk_label_set_text(GTK_LABEL(gtkui.resistance), waitmsg); gtk_label_set_text(GTK_LABEL(gtkui.voltage), waitmsg); diff --git a/src/server/gtklayout.ui b/src/server/gtklayout.ui index bd62dc8..ffe4fb5 100644 --- a/src/server/gtklayout.ui +++ b/src/server/gtklayout.ui @@ -21,6 +21,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="resizable">False</property> + <property name="icon_name">emblem-default</property> <signal name="destroy" handler="gtk_main_quit" swapped="no"/> <child> <object class="GtkBox"> @@ -157,37 +158,37 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkLabel" id="ticker"> + <object class="GtkLabel" id="tempvalue"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin_left">4</property> + <property name="halign">start</property> + <property name="margin_left">2</property> <property name="margin_right">2</property> <property name="margin_top">2</property> <property name="margin_bottom">2</property> </object> <packing> - <property name="left_attach">0</property> + <property name="left_attach">5</property> <property name="top_attach">0</property> </packing> </child> <child> - <object class="GtkLabel"> + <object class="GtkLabel" id="voltage"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">end</property> + <property name="halign">start</property> <property name="margin_left">2</property> <property name="margin_right">2</property> <property name="margin_top">2</property> <property name="margin_bottom">2</property> - <property name="label" translatable="yes"> Temperature: </property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left_attach">5</property> + <property name="top_attach">2</property> </packing> </child> <child> - <object class="GtkLabel" id="tempvalue"> + <object class="GtkLabel" id="resistance"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> @@ -197,12 +198,42 @@ <property name="margin_bottom">2</property> </object> <packing> - <property name="left_attach">2</property> + <property name="left_attach">5</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">4</property> <property name="top_attach">0</property> </packing> </child> <child> - <object class="GtkLabel" id="reslabel"> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="voltlabel"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">end</property> @@ -210,60 +241,93 @@ <property name="margin_right">2</property> <property name="margin_top">2</property> <property name="margin_bottom">2</property> - <property name="label" translatable="yes"> Resistence: </property> + <property name="label" translatable="yes"> Voltage: </property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left_attach">3</property> + <property name="top_attach">2</property> </packing> </child> <child> - <object class="GtkLabel" id="resistance"> + <object class="GtkLabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">start</property> + <property name="halign">end</property> <property name="margin_left">2</property> <property name="margin_right">2</property> <property name="margin_top">2</property> <property name="margin_bottom">2</property> + <property name="label" translatable="yes"> Temperature: </property> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">1</property> + <property name="left_attach">3</property> + <property name="top_attach">0</property> </packing> </child> <child> - <object class="GtkLabel" id="voltage"> + <object class="GtkLabel" id="reslabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">start</property> + <property name="halign">end</property> <property name="margin_left">2</property> <property name="margin_right">2</property> <property name="margin_top">2</property> <property name="margin_bottom">2</property> + <property name="label" translatable="yes"> Resistence: </property> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">2</property> + <property name="left_attach">3</property> + <property name="top_attach">1</property> </packing> </child> <child> - <object class="GtkLabel" id="voltlabel"> + <object class="GtkLabel" id="ticker"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">end</property> - <property name="margin_left">2</property> + <property name="margin_left">4</property> <property name="margin_right">2</property> <property name="margin_top">2</property> <property name="margin_bottom">2</property> - <property name="label" translatable="yes"> Voltage: </property> </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="top_attach">0</property> </packing> </child> <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkImage" id="statusimg"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">gtk-media-pause</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> <placeholder/> </child> <child> @@ -284,6 +348,7 @@ <property name="resizable">False</property> <property name="window_position">center-on-parent</property> <property name="destroy_with_parent">True</property> + <property name="icon_name">gtk-about</property> <property name="type_hint">dialog</property> <property name="transient_for">window</property> <property name="program_name">Coffeetemp</property> diff --git a/src/server/gtklayout_flash.ui b/src/server/gtklayout_flash.ui index 9972a4e..a698e16 100644 --- a/src/server/gtklayout_flash.ui +++ b/src/server/gtklayout_flash.ui @@ -18,6 +18,7 @@ <property name="title" translatable="yes">coffeetemp – write flash</property> <property name="resizable">False</property> <property name="destroy_with_parent">True</property> + <property name="icon_name">gtk-properties</property> <child> <object class="GtkGrid"> <property name="visible">True</property> @@ -307,6 +308,7 @@ <property name="resizable">False</property> <property name="modal">True</property> <property name="destroy_with_parent">True</property> + <property name="icon_name">dialog-warning</property> <property name="type_hint">dialog</property> <property name="skip_taskbar_hint">True</property> <property name="transient_for">flashwindow</property> |