mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-10-14 17:47:13 +00:00
fix menu.c build warnings
This commit is contained in:
@@ -297,40 +297,6 @@ mg_color_component_to_pango (double value)
|
||||
return (guint16)(value * 65535.0 + 0.5);
|
||||
}
|
||||
|
||||
static void
|
||||
mg_apply_font_css (GtkWidget *widget, const PangoFontDescription *desc,
|
||||
const char *class_name, const char *provider_key)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
GtkCssProvider *provider;
|
||||
GString *css;
|
||||
|
||||
if (!widget || !desc)
|
||||
return;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
if (!context)
|
||||
return;
|
||||
|
||||
provider = g_object_get_data (G_OBJECT (widget), provider_key);
|
||||
if (!provider)
|
||||
{
|
||||
provider = gtk_css_provider_new ();
|
||||
g_object_set_data_full (G_OBJECT (widget), provider_key, provider, g_object_unref);
|
||||
}
|
||||
|
||||
css = g_string_new (".");
|
||||
g_string_append (css, class_name);
|
||||
g_string_append (css, " {");
|
||||
gtkutil_append_font_css (css, desc);
|
||||
g_string_append (css, " }");
|
||||
gtk_css_provider_load_from_data (provider, css->str, -1, NULL);
|
||||
g_string_free (css, TRUE);
|
||||
|
||||
gtk_style_context_add_class (context, class_name);
|
||||
theme_css_apply_widget_provider (widget, GTK_STYLE_PROVIDER (provider));
|
||||
}
|
||||
|
||||
static void
|
||||
mg_set_label_alignment_start (GtkWidget *widget)
|
||||
{
|
||||
|
||||
@@ -1962,7 +1962,10 @@ menu_about (GtkWidget *wid, gpointer sess)
|
||||
gtk_about_dialog_set_logo (dialog, pix_zoitechat);
|
||||
gtk_about_dialog_set_copyright (dialog, "\302\251 1998-2010 Peter \305\275elezn\303\275\n\302\251 2009-2014 Berke Viktor\n\302\251 2015-2025 Patrick Griffis\n\302\251 2026 deepend");
|
||||
gtk_about_dialog_set_comments (dialog, comment);
|
||||
/* Preserve the About dialog's existing action-area button layout. */
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
actions = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
children = gtk_container_get_children (GTK_CONTAINER (actions));
|
||||
for (child = children; child; child = child->next)
|
||||
gtk_widget_destroy (GTK_WIDGET (child->data));
|
||||
|
||||
Reference in New Issue
Block a user