Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-client-gnome
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
155
Issues
155
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-client-gnome
Commits
03eb4e6b
Commit
03eb4e6b
authored
Sep 25, 2018
by
Hugo Lefeuvre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: fix more gtk warnings and memory leaks
Change-Id: Ic2c21f958d6d3aad5e6f686b7f657b70c53e1040
parent
16402431
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
21 deletions
+14
-21
src/accountcreationwizard.cpp
src/accountcreationwizard.cpp
+8
-12
src/avatarmanipulation.cpp
src/avatarmanipulation.cpp
+2
-2
src/conversationsview.cpp
src/conversationsview.cpp
+4
-1
ui/accountcreationwizard.ui
ui/accountcreationwizard.ui
+0
-4
ui/newaccountsettingsview.ui
ui/newaccountsettingsview.ui
+0
-2
No files found.
src/accountcreationwizard.cpp
View file @
03eb4e6b
...
...
@@ -57,8 +57,6 @@ struct _AccountCreationWizardPrivate
gchar
*
avatar
;
GtkWidget
*
stack_account_creation
;
QMetaObject
::
Connection
account_state_changed
;
QMetaObject
::
Connection
name_registration_ended
;
gboolean
username_available
;
/* choose_account_type_vbox */
...
...
@@ -127,7 +125,6 @@ account_creation_wizard_dispose(GObject *object)
// make sure preview is stopped and destroyed
account_creation_wizard_show_preview
(
ACCOUNT_CREATION_WIZARD
(
object
),
FALSE
);
QObject
::
disconnect
(
priv
->
account_state_changed
);
G_OBJECT_CLASS
(
account_creation_wizard_parent_class
)
->
dispose
(
object
);
}
...
...
@@ -311,22 +308,19 @@ create_existing_ring_account(AccountCreationWizard *win)
gchar
*
password
=
g_strdup
(
gtk_entry_get_text
(
GTK_ENTRY
(
priv
->
entry_existing_account_password
)));
gtk_entry_set_text
(
GTK_ENTRY
(
priv
->
entry_existing_account_password
),
""
);
gchar
*
pin
=
nullptr
;
auto
curPin
=
gtk_entry_get_text
(
GTK_ENTRY
(
priv
->
entry_existing_account_pin
));
if
(
curPin
and
strlen
(
curPin
)
>
0
)
{
pin
=
g_strdup
(
curPin
);
gchar
*
pin
=
g_strdup
(
gtk_entry_get_text
(
GTK_ENTRY
(
priv
->
entry_existing_account_pin
)));
if
(
pin
and
strlen
(
pin
)
>
0
)
{
gtk_entry_set_text
(
GTK_ENTRY
(
priv
->
entry_existing_account_pin
),
""
);
}
gchar
*
archive
=
nullptr
;
auto
archivePath
=
gtk_file_chooser_get_filename
(
GTK_FILE_CHOOSER
(
priv
->
entry_existing_account_archive
));
if
(
archivePath
)
{
archive
=
g_strdup
(
archivePath
);
gchar
*
archive
=
g_strdup
(
gtk_file_chooser_get_filename
(
GTK_FILE_CHOOSER
(
priv
->
entry_existing_account_archive
)));
if
(
archive
)
{
gtk_file_chooser_set_filename
(
GTK_FILE_CHOOSER
(
priv
->
entry_existing_account_archive
),
nullptr
);
}
auto
status
=
create_ring_account
(
win
,
NULL
,
NULL
,
password
,
pin
,
archive
);
g_free
(
archive
);
g_free
(
password
);
g_free
(
pin
);
...
...
@@ -440,7 +434,7 @@ entries_existing_account_changed(G_GNUC_UNUSED GtkEntry *entry, AccountCreationW
AccountCreationWizardPrivate
*
priv
=
ACCOUNT_CREATION_WIZARD_GET_PRIVATE
(
view
);
const
gchar
*
pin
=
gtk_entry_get_text
(
GTK_ENTRY
(
priv
->
entry_existing_account_pin
));
const
gchar
*
archive_path
=
gtk_file_chooser_get_filename
(
GTK_FILE_CHOOSER
(
priv
->
entry_existing_account_archive
));
gchar
*
archive_path
=
gtk_file_chooser_get_filename
(
GTK_FILE_CHOOSER
(
priv
->
entry_existing_account_archive
));
bool
hasPin
=
pin
and
strlen
(
pin
)
>
0
;
bool
hasArchive
=
archive_path
and
strlen
(
archive_path
)
>
0
;
...
...
@@ -457,6 +451,8 @@ entries_existing_account_changed(G_GNUC_UNUSED GtkEntry *entry, AccountCreationW
priv
->
button_existing_account_next
,
(
hasArchive
||
hasPin
)
);
g_free
(
archive_path
);
}
static
void
...
...
src/avatarmanipulation.cpp
View file @
03eb4e6b
...
...
@@ -237,9 +237,9 @@ set_state(AvatarManipulation *self, AvatarManipulationState state)
auto
photostr
=
priv
->
temporaryAvatar
?
priv
->
temporaryAvatar
:
(
*
priv
->
accountInfo_
)
->
profileInfo
.
avatar
;
QByteArray
byteArray
(
photostr
.
c_str
(),
photostr
.
length
());
QVariant
avatar
=
Interfaces
::
PixbufManipulator
().
personPhoto
(
byteArray
);
auto
pixbuf_photo
=
Interfaces
::
PixbufManipulator
().
scaleAndFrame
(
avatar
.
value
<
std
::
shared_ptr
<
GdkPixbuf
>>
().
get
(),
QSize
(
AVATAR_WIDTH
,
AVATAR_HEIGHT
));
if
(
avatar
.
isValid
())
{
photo
=
pixbuf_photo
;
auto
size
=
QSize
(
AVATAR_WIDTH
,
AVATAR_HEIGHT
);
photo
=
Interfaces
::
PixbufManipulator
().
scaleAndFrame
(
avatar
.
value
<
std
::
shared_ptr
<
GdkPixbuf
>>
().
get
(),
size
);
}
}
gtk_image_set_from_pixbuf
(
GTK_IMAGE
(
priv
->
image_avatar
),
photo
.
get
());
...
...
src/conversationsview.cpp
View file @
03eb4e6b
...
...
@@ -715,8 +715,11 @@ conversations_view_new(AccountInfoPointer const & accountInfo)
priv
->
accountInfo_
=
&
accountInfo
;
if
(
*
priv
->
accountInfo_
)
if
(
*
priv
->
accountInfo_
)
{
build_conversations_view
(
self
);
}
else
{
g_debug
(
"building conversationsview for inexistant account (just removed ?)"
);
}
return
(
GtkWidget
*
)
self
;
}
...
...
ui/accountcreationwizard.ui
View file @
03eb4e6b
...
...
@@ -168,8 +168,6 @@
<property
name=
"width-chars"
>
40
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_default"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"xalign"
>
0.5
</property>
<property
name=
"primary_icon_stock"
>
gtk-dialog-authentication
</property>
<property
name=
"input_purpose"
>
password
</property>
...
...
@@ -215,8 +213,6 @@
<property
name=
"width-chars"
>
40
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_default"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"xalign"
>
0.5
</property>
<property
name=
"primary_icon_stock"
>
gtk-dialog-authentication
</property>
<property
name=
"input_purpose"
>
password
</property>
...
...
ui/newaccountsettingsview.ui
View file @
03eb4e6b
...
...
@@ -773,8 +773,6 @@
<object
class=
"GtkEntry"
id=
"entry_sip_password"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_default"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"halign"
>
fill
</property>
<property
name=
"visibility"
>
False
</property>
<property
name=
"primary_icon_stock"
>
gtk-dialog-authentication
</property>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment