Commit 6156c864 authored by Victor Ananjesky's avatar Victor Ananjesky

Merge branch 'master' of github.com:v1cont/yad

parents c5de754e 035fc76a
......@@ -1273,7 +1273,7 @@ form_print_field (guint fn)
{
gchar *fname;
#if !GTK_CHECK_VERSION(3,0,0)
fname = gtk_font_button_get_font_name (GTK_FONT_BUTTON (g_slist_nth_data (fields, fn)));
fname = (gchar *) gtk_font_button_get_font_name (GTK_FONT_BUTTON (g_slist_nth_data (fields, fn)));
#else
fname = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (g_slist_nth_data (fields, fn)));
#endif
......
......@@ -607,7 +607,11 @@ create_dialog (void)
{
gint ww, wh, sw, sh;
gtk_window_get_size (GTK_WINDOW (dlg), &ww, &wh);
#if !GTK_CHECK_VERSION(3,0,0)
gdk_window_get_geometry (gdk_get_default_root_window (), NULL, NULL, &sw, &sh, NULL);
#else
gdk_window_get_geometry (gdk_get_default_root_window (), NULL, NULL, &sw, &sh);
#endif
/* place window to specified coordinates */
if (!options.data.use_posx)
gtk_window_get_position (GTK_WINDOW (dlg), &options.data.posx, NULL);
......
......@@ -1041,6 +1041,7 @@ set_expander (const gchar * option_name, const gchar * value, gpointer data, GEr
options.data.expander = g_strdup (value);
else
options.data.expander = "";
return TRUE;
}
......@@ -1127,6 +1128,8 @@ set_posx (const gchar * option_name, const gchar * value, gpointer data, GError
{
options.data.use_posx = TRUE;
options.data.posx = atol (value);
return TRUE;
}
static gboolean
......@@ -1134,6 +1137,8 @@ set_posy (const gchar * option_name, const gchar * value, gpointer data, GError
{
options.data.use_posy = TRUE;
options.data.posy = atol (value);
return TRUE;
}
static gboolean
......@@ -1193,6 +1198,8 @@ set_scroll_policy (const gchar * option_name, const gchar * value, gpointer data
options.hscroll_policy = pt;
else
options.vscroll_policy = pt;
return TRUE;
}
#if GLIB_CHECK_VERSION(2,30,0)
......@@ -1200,6 +1207,8 @@ static gboolean
set_size_format (const gchar * option_name, const gchar * value, gpointer data, GError ** err)
{
options.common_data.size_fmt = G_FORMAT_SIZE_IEC_UNITS;
return TRUE;
}
#endif
......@@ -1210,6 +1219,8 @@ set_xid_file (const gchar * option_name, const gchar * value, gpointer data, GEr
options.print_xid = TRUE;
if (value && value[0])
options.xid_file = g_strdup (value);
return TRUE;
}
static gboolean
......
......@@ -198,7 +198,7 @@ get_color (GdkColor *c, guint64 alpha)
{
case YAD_COLOR_HEX:
if (options.color_data.alpha)
res = g_strdup_printf ("#%X%X%X%X", c->red & 0xFF, c->green & 0xFF, c->blue & 0xFF, (alpha / 256) & 0xFF);
res = g_strdup_printf ("#%X%X%X%X", c->red & 0xFF, c->green & 0xFF, c->blue & 0xFF, (guint) ((alpha / 256) & 0xFF));
else
res = g_strdup_printf ("#%X%X%X", c->red & 0xFF, c->green & 0xFF, c->blue & 0xFF);
break;
......@@ -636,7 +636,7 @@ show_langs ()
GList *lng;
for (lng = gtk_spell_checker_get_language_list (); lng; lng = lng->next)
g_print ("%s\n", lng->data);
g_print ("%s\n", (gchar *) lng->data);
}
#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