[gnome-commander] Initialize gnome-cmd-file-selector with string and not gchar
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Initialize gnome-cmd-file-selector with string and not gchar
- Date: Tue, 19 Feb 2019 21:43:56 +0000 (UTC)
commit 8e2ddc4aa700e4fa3eb88bff87fa024e784303df
Author: Uwe Scholz <u scholz83 gmx de>
Date: Tue Feb 19 22:42:18 2019 +0100
Initialize gnome-cmd-file-selector with string and not gchar
src/gnome-cmd-file-selector.cc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 94b1a896..be70c830 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -811,7 +811,6 @@ static void init (GnomeCmdFileSelector *fs)
for (GList *l=gnome_cmd_con_list_get_all (gnome_cmd_con_list_get ()); l; l = l->next)
{
- gchar *text;
GnomeCmdCon *con = (GnomeCmdCon *) l->data;
#ifdef HAVE_SAMBA
@@ -821,10 +820,9 @@ static void init (GnomeCmdFileSelector *fs)
if (!gnome_cmd_con_is_open (con) && !GNOME_CMD_IS_CON_DEVICE (con)) continue;
#endif
- text = g_strdup_printf("%s ",(gchar *) gnome_cmd_con_get_alias (con));
- string_size = get_string_pixel_size (text, strlen(text));
+ string textstring {gnome_cmd_con_get_alias (con)};
+ string_size = get_string_pixel_size (textstring.c_str(), textstring.length());
max_string_size = string_size > max_string_size ? string_size : max_string_size;
- g_free(text);
}
// create the connection combo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]