-
-
It might be a lot easier if we just add a helper function to get the selected room. That should avoid all the
g_object_[gs]et_data
stuff. -
These should be named spaced, but we also try to avoid prototypes by just defining functions before they are needed.
-
-
-
-
according to the gtk4-demo menu progran, you just bind the child menu to the parent, and then call popup on it when you need it. Therefore avoiding needing to get an object from gtk builder and so on.
-
The
menu
element can and should be put directly in roomlist.ui at the same level as thetemplate
element. This will allow you to use thegtk_widget_class_bind_template_child
. -
delete-event
was replaced withclose-request
. Which also meansdelete_win_cb
should be renamed and have it's properties adjusted. -
-
-
-
-
-
action area got reworked see https://docs.gtk.org/gtk4/class.Dialog.html#gtkdialog-as-gtkbuildable for an example. And we should be using response ids instead of direct callbacks.
Port PidginRoomlistDialog to GTK4
Review Request #1423 — Created May 7, 2022 and submitted
Port PidginRoomlistDialog to GTK4
Compiled.
Summary | ID |
---|---|
61337b8f8147c0c7f3b19c1cdaf7479bb7921618 |
Description | From | Last Updated |
---|---|---|
It might be a lot easier if we just add a helper function to get the selected room. That should … |
grim | |
These should be named spaced, but we also try to avoid prototypes by just defining functions before they are needed. |
grim | |
you probably want gtk_widget_get_toplevel instead. |
grim | |
likewise on gtk_widget_get_toplevel |
grim | |
according to your g_action_group_add_entries call, this data should be set on dialog |
grim | |
according to the gtk4-demo menu progran, you just bind the child menu to the parent, and then call popup on … |
grim | |
The menu element can and should be put directly in roomlist.ui at the same level as the template element. This … |
grim | |
delete-event was replaced with close-request. Which also means delete_win_cb should be renamed and have it's properties adjusted. |
grim | |
This should probably be visible. |
grim | |
the box itself wasn't set to fill or expand. |
grim | |
needs halign = fill or GTK_ALIGN_FILL as well. |
grim | |
seeds valign set to GTK_ALIGN_FILL |
grim | |
the old progress bar didn't have align or expand set. |
grim | |
action area got reworked see https://docs.gtk.org/gtk4/class.Dialog.html#gtkdialog-as-gtkbuildable for an example. And we should be using response ids instead of direct callbacks. |
grim | |
You can bind the selection via the ui file and gtk_widget_class_bind_template_child in pidgin_roomlist_class_init to avoid having to do this lookup. … |
grim | |
alignment is off, should be using spaces to align it with the first parameter after the (. |
grim | |
unused parameters should be marked with G_GNUC_UNUSED like G_GNUC_UNUSED GSimpleActions *action, G_GNUC_UNUSED GVariant *parameter |
grim | |
alignment again |
grim | |
d is unused and should be marked as so. |
grim | |
w is unused and should be marked as so. |
grim | |
There should probably be a if(PURPLE_IS_ROOMLIST_ROOM(room)) before this. |
grim | |
You don't need to typecast a gpointer, it'll be implicitly cast. |
grim | |
gdouble for consistency |
grim | |
no need for the cast |
grim | |
Typically we validate parameters before acting on them. So this should use g_return_if_fail(PURPLE_IS_ACCOUNT(account)); before creating the dialog, which that that … |
grim | |
this should probably be start i think? |
grim | |
Action area has been removed in GTK4. The child buttons are just normal children with an additional attribute of type="action" … |
grim | |
We should probably make sure that a room was selected before attempting to join it. |
grim |
- Change Summary:
-
Resolved the issues.
- Commits:
-
Summary ID bffe2a708e8f0d74d6320edd77d044229cd2e899 1e5caca5737e4f1fdd34eddabadca2551e436826 - Diff:
-
Revision 2 (+584 -608)
-
-
You can bind the selection via the ui file and
gtk_widget_class_bind_template_child
inpidgin_roomlist_class_init
to avoid having to do this lookup. See https://docs.gtk.org/gtk4/class.TreeView.html#gtktreeview-as-gtkbuildable for the ui file syntax. -
-
unused parameters should be marked with
G_GNUC_UNUSED
likeG_GNUC_UNUSED GSimpleActions *action, G_GNUC_UNUSED GVariant *parameter
-
-
-
-
-
-
-
-
Typically we validate parameters before acting on them.
So this should use
g_return_if_fail(PURPLE_IS_ACCOUNT(account));
before creating the dialog, which that that point should be valid and not need ag_return_if_*
macro. -
-
Action area has been removed in GTK4. The child buttons are just normal children with an additional attribute of
type="action"
on them.https://docs.gtk.org/gtk4/class.Dialog.html#gtkdialog-as-gtkbuildable
- Change Summary:
-
Resolved issues.
- Commits:
-
Summary ID 1e5caca5737e4f1fdd34eddabadca2551e436826 7db1c7b105a276ea0ab87032a1564fef55d17b85 - Diff:
-
Revision 3 (+584 -610)
- Change Summary:
-
Address issues.
- Commits:
-
Summary ID 7db1c7b105a276ea0ab87032a1564fef55d17b85 61337b8f8147c0c7f3b19c1cdaf7479bb7921618 - Diff:
-
Revision 4 (+588 -610)