LatexilaUtils: GNOME LaTeX Reference Manual

## LatexilaUtils LatexilaUtils — Utility functions |

## Functions

void | latexila_utils_show_uri ()
GtkWidget * | latexila_utils_get_dialog_component ()
GtkWidget * | latexila_utils_join_widgets ()
GdkPixbuf * | latexila_utils_get_pixbuf_from_icon_name ()
void | latexila_utils_register_icons ()
void | latexila_utils_migrate_latexila_to_gnome_latex ()

## Includes

    #include <latexila.h>

## Description

Various utility functions.

## Functions

### latexila_utils_show_uri ()

    void
    latexila_utils_show_uri (GtkWidget *widget,
                             const gchar *uri,
                             guint32 timestamp,
                             GError **error);

Shows the `uri` . If the URI is a PDF file and if Evince is the default document viewer, this function also connects the Evince window so the backward search works (switch from the PDF to the source file).

#### Parameters

widget | the associated GtkWidget, or `NULL`. | [nullable]
uri | the URI to show. |
timestamp | a timestamp. |
error | a `NULL` GError, or `NULL`. | [out][optional]

### latexila_utils_get_dialog_component ()

    GtkWidget *
    latexila_utils_get_dialog_component (const gchar *title,
                                         GtkWidget *widget);

Gets a GtkDialog component. When a dialog contains several components, or logical groups, this function is useful to attach the `widget` with a `title` . The title will be in bold, left-aligned, and the widget will have a left margin.

#### Parameters

title | the title of the dialog component. |
widget | the widget displayed below the title. |

#### Returns

the dialog component containing the `title` and the `widget` .

[transfer floating]

### latexila_utils_join_widgets ()

    GtkWidget *
    latexila_utils_join_widgets (GtkWidget *widget_top,
                                 GtkWidget *widget_bottom);

Joins two widgets vertically, with junction sides.

#### Parameters

widget_top | the GtkWidget at the top. |
widget_bottom | the GtkWidget at the bottom. |

#### Returns

a GtkContainer containing `widget_top` and `widget_bottom` .

[transfer floating]

### latexila_utils_get_pixbuf_from_icon_name ()

    GdkPixbuf *
    latexila_utils_get_pixbuf_from_icon_name
                                   (const gchar *icon_name,
                                    GtkIconSize icon_size);

#### Parameters

icon_name | an icon name. |
icon_size | an icon size. |

#### Returns

the corresponding GdkPixbuf.

[nullable][transfer full]

### latexila_utils_register_icons ()

    void
    latexila_utils_register_icons (void);

Register the GNOME LaTeX icons to the GtkIconTheme as built-in icons.

TODO: prefix icon names with "glatex-", so for example badbox.png would be "glatex-badbox".

### latexila_utils_migrate_latexila_to_gnome_latex ()

    void
    latexila_utils_migrate_latexila_to_gnome_latex
                                   (void);

Migrates the GSettings values and user data/config files from LaTeXila to GNOME LaTeX, so that users don't lose all their settings.

TODO in >= 2025: delete this code.