Skip to content
Permalink
Browse files

Adding tooltip for file buttons if no file loaded and fix minor bug

in utils_str_break_filename()
  • Loading branch information...
pbiava committed Feb 8, 2018
1 parent 98fd799 commit 096f6e86c3fbbda3497319642a1c2c3844b9c00e
Showing with 5 additions and 2 deletions.
  1. +1 −0 src/grisbi_win.c
  2. +4 −2 src/utils_str.c
@@ -592,6 +592,7 @@ static void grisbi_win_no_file_page_new (GrisbiWin *win)
tmp_str = utils_str_break_filename (recent_files_array[i], GSB_NBRE_CHAR);

bouton = utils_buttons_button_new_from_stock ("gtk-open", tmp_str);
gtk_widget_set_tooltip_text (bouton, recent_files_array[i]);
gtk_button_set_image_position (GTK_BUTTON (bouton), GTK_POS_TOP);
gtk_widget_set_size_request (bouton, 150, 150);
gtk_widget_set_halign (bouton, GTK_ALIGN_CENTER);
@@ -1070,7 +1070,7 @@ gchar *utils_str_break_filename (const gchar *string,
gchar *end = NULL;
gchar *ptr = NULL;
gchar *separator;
gint i = 1;
gint i = 0;
ssize_t n = 0;
ssize_t size1;
ssize_t size2;
@@ -1104,6 +1104,7 @@ gchar *utils_str_break_filename (const gchar *string,
g_free (tmp_dir);
tmp_dir = tmp_str2;
size3 = g_utf8_strlen (tmp_dir, -1);
i++;
do
{
end = g_utf8_offset_to_pointer (dirname, size3);
@@ -1125,10 +1126,11 @@ gchar *utils_str_break_filename (const gchar *string,
tmp_str2 = g_strconcat (tmp_dir, "\n", end, NULL);
g_free (tmp_dir);
tmp_dir = tmp_str2;
break;
}
ptr = NULL;
i++;
} while (i <= n);
} while (i < n);
}
else if (dirname && size2 <= trunc)
tmp_dir = g_strdup (dirname);

0 comments on commit 096f6e8

Please sign in to comment.
You can’t perform that action at this time.