Commit 9c0f624a authored by Sean Davis's avatar Sean Davis
Browse files

Tidy up xfcekbd-indicator.{c,h}

parent c8106a83
......@@ -451,7 +451,7 @@ xfcekbd_indicator_parent_set (GtkWidget * gki, GtkWidget * previous_parent)
}
void
static void
xfcekbd_indicator_reinit_ui (XfcekbdIndicator * gki)
{
xfcekbd_indicator_cleanup (gki);
......@@ -850,69 +850,3 @@ xfcekbd_indicator_set_parent_tooltips (XfcekbdIndicator * gki, gboolean spt)
gki->priv->set_parent_tooltips = spt;
xfcekbd_indicator_update_tooltips (gki);
}
void
xfcekbd_indicator_set_tooltips_format (const gchar format[])
{
globals.tooltips_format = format;
ForAllIndicators ()
xfcekbd_indicator_update_tooltips (gki);
NextIndicator ()
}
/**
* xfcekbd_indicator_get_xkl_engine:
*
* Returns: (transfer none): The engine shared by all XfcekbdIndicator objects
*/
XklEngine *
xfcekbd_indicator_get_xkl_engine ()
{
return globals.engine;
}
/**
* xfcekbd_indicator_get_group_names:
*
* Returns: (transfer none) (array zero-terminated=1): List of group names
*/
gchar **
xfcekbd_indicator_get_group_names ()
{
return globals.full_group_names;
}
gchar *
xfcekbd_indicator_get_image_filename (guint group)
{
if (!globals.ind_cfg.show_flags)
return NULL;
return xfcekbd_indicator_config_get_images_file (&globals.ind_cfg,
&globals.kbd_cfg,
group);
}
gdouble
xfcekbd_indicator_get_max_width_height_ratio (void)
{
gdouble rv = 0.0;
GSList *ip = globals.images;
if (!globals.ind_cfg.show_flags)
return 0;
while (ip != NULL) {
GdkPixbuf *img = GDK_PIXBUF (ip->data);
gdouble r =
1.0 * gdk_pixbuf_get_width (img) /
gdk_pixbuf_get_height (img);
if (r > rv)
rv = r;
ip = ip->next;
}
return rv;
}
void
xfcekbd_indicator_set_angle (XfcekbdIndicator * gki, gdouble angle)
{
gki->priv->angle = angle;
}
......@@ -54,26 +54,10 @@ extern "C" {
extern GtkWidget *xfcekbd_indicator_new (void);
extern void xfcekbd_indicator_reinit_ui (XfcekbdIndicator * gki);
extern void xfcekbd_indicator_set_angle (XfcekbdIndicator * gki,
gdouble angle);
extern XklEngine *xfcekbd_indicator_get_xkl_engine (void);
extern gchar **xfcekbd_indicator_get_group_names (void);
extern gchar *xfcekbd_indicator_get_image_filename (guint group);
extern gdouble xfcekbd_indicator_get_max_width_height_ratio (void);
extern void
xfcekbd_indicator_set_parent_tooltips (XfcekbdIndicator *
gki, gboolean ifset);
extern void
xfcekbd_indicator_set_tooltips_format (const gchar str[]);
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment