pidgin/pidgin

Port the room list from GtkTreeView to GtkColumnView

16 months ago, Elliott Sales de Andrade
941734e74261
Port the room list from GtkTreeView to GtkColumnView

Note, this removes the tooltip. It's not super easy to get the cell that the mouse is over, plus all it showed was the Name, which is pretty redundant.

It also removes the popup menu, for the same reason, as it just duplicates the response buttons, and on a `ColumnView`, right-clicking does not select the hovered row anyway.

Testing Done:
Fetched room list for `conference.pidgin.im`, clicked on the rows, and saw that the buttons were enabled (though I think all responses were chats so they were always enabled once one was selected.) Typed some bit of the names and they were filtered.

Reviewed at https://reviews.imfreedom.org/r/2209/
purple_coresources = [
'account.c',
'accounts.c',
'action.c',
'blistnode.c',
'buddy.c',
'buddylist.c',
'buddyicon.c',
'chat.c',
'circularbuffer.c',
'cmds.c',
'connection.c',
'contact.c',
'conversations.c',
'core.c',
'countingnode.c',
'debug.c',
'eventloop.c',
'group.c',
'idle.c',
'image.c',
'image-store.c',
'media/backend-iface.c',
'media/candidate.c',
'media/codec.c',
'media/enum-types.c',
'media.c',
'mediamanager.c',
'network.c',
'notify.c',
'plugins.c',
'pluginpref.c',
'prefs.c',
'proxy.c',
'protocols.c',
'purpleaccountmanager.c',
'purpleaccountoption.c',
'purpleaccountpresence.c',
'purpleaccountusersplit.c',
'purpleaddcontactrequest.c',
'purpleattachment.c',
'purpleauthorizationrequest.c',
'purpleavatar.c',
'purplebuddypresence.c',
'purplechatconversation.c',
'purplechatuser.c',
'purpleconnectionerrorinfo.c',
'purplecontact.c',
'purplecontactinfo.c',
'purplecontactmanager.c',
'purpleconversation.c',
'purpleconversationmanager.c',
'purpleconversationuiops.c',
'purplecredentialmanager.c',
'purplecredentialprovider.c',
'purpledebugui.c',
'purplegdkpixbuf.c',
'purplegio.c',
'purplehistoryadapter.c',
'purplehistorymanager.c',
'purpleidleui.c',
'purpleimconversation.c',
'purplekeyvaluepair.c',
'purplemarkup.c',
'purplemenu.c',
'purplemessage.c',
'purplenoopcredentialprovider.c',
'purplenotification.c',
'purplenotificationmanager.c',
'purpleoptions.c',
'purplepath.c',
'purpleperson.c',
'purpleplugininfo.c',
'purplepresence.c',
'purpleprotocol.c',
'purpleprotocolactions.c',
'purpleprotocolchat.c',
'purpleprotocolclient.c',
'purpleprotocolim.c',
'purpleprotocolmanager.c',
'purpleprotocolmedia.c',
'purpleprotocolroomlist.c',
'purpleprotocolserver.c',
'purpleprotocolwhiteboard.c',
'purpleproxyinfo.c',
'purpleroomlistroom.c',
'purplesqlite3.c',
'purplesqlitehistoryadapter.c',
'purpletags.c',
'purpleui.c',
'purplewhiteboard.c',
'purplewhiteboardmanager.c',
'purplewhiteboarduiops.c',
'queuedoutputstream.c',
'request.c',
'request-datasheet.c',
'roomlist.c',
'savedstatuses.c',
'server.c',
'signals.c',
'status.c',
'stun.c',
'util.c',
'version.c',
'xfer.c',
'xmlnode.c'
]
purple_coreheaders = [
'account.h',
'accounts.h',
'action.h',
'blistnode.h',
'buddy.h',
'buddylist.h',
'buddyicon.h',
'chat.h',
'circularbuffer.h',
'cmds.h',
'connection.h',
'contact.h',
'conversations.h',
'core.h',
'countingnode.h',
'debug.h',
'eventloop.h',
'group.h',
'idle.h',
'image.h',
'image-store.h',
'media.h',
'media-gst.h',
'mediamanager.h',
'network.h',
'notify.h',
'plugins.h',
'pluginpref.h',
'prefs.h',
'proxy.h',
'protocols.h',
'purpleaccountmanager.h',
'purpleaccountoption.h',
'purpleaccountpresence.h',
'purpleaccountusersplit.h',
'purpleaddcontactrequest.h',
'purpleauthorizationrequest.h',
'purpleavatar.h',
'purplebuddypresence.h',
'purplechatconversation.h',
'purplechatuser.h',
'purpleconnectionerrorinfo.h',
'purplecontact.h',
'purplecontactinfo.h',
'purplecontactmanager.h',
'purpleconversation.h',
'purpleconversationmanager.h',
'purpleconversationuiops.h',
'purplecredentialmanager.h',
'purplecredentialprovider.h',
'purpledebugui.h',
'purplegdkpixbuf.h',
'purplegio.h',
'purplehistoryadapter.h',
'purplehistorymanager.h',
'purpleidleui.h',
'purpleimconversation.h',
'purpleattachment.h',
'purplekeyvaluepair.h',
'purplemarkup.h',
'purplemenu.h',
'purplemessage.h',
'purplenoopcredentialprovider.h',
'purplenotification.h',
'purplenotificationmanager.h',
'purpleoptions.h',
'purplepath.h',
'purpleperson.h',
'purpleplugininfo.h',
'purplepresence.h',
'purpleprotocol.h',
'purpleprotocolactions.h',
'purpleprotocolchat.h',
'purpleprotocolclient.h',
'purpleprotocolim.h',
'purpleprotocolmedia.h',
'purpleprotocolmanager.h',
'purpleprotocolroomlist.h',
'purpleprotocolserver.h',
'purpleprotocolwhiteboard.h',
'purpleproxyinfo.h',
'purpleroomlistroom.h',
'purplesqlite3.h',
'purplesqlitehistoryadapter.h',
'purpletags.h',
'purpleui.h',
'purplewhiteboard.h',
'purplewhiteboardmanager.h',
'purplewhiteboardops.h',
'purplewhiteboarduiops.h',
'queuedoutputstream.h',
'request.h',
'request-datasheet.h',
'roomlist.h',
'savedstatuses.h',
'server.h',
'signals.h',
'status.h',
'stun.h',
'tests.h',
'util.h',
'xfer.h',
'xmlnode.h',
]
purple_generated_sources = []
# An environment for unit tests.
testenv = environment()
purple_resource = gnome.compile_resources('purpleresources',
'resources/libpurple.gresource.xml',
source_dir : 'resources',
c_name : 'purple')
purple_coresources += purple_resource
purple_filebase = f'purple-@purple_major_version@'
purple_include_base = purple_filebase / 'libpurple'
if IS_WIN32
purple_coresources += [
'win32/libc_interface.c',
'win32/win32dep.c'
]
purple_coreheaders += [
'win32/win32dep.h',
]
libpurplerc = configure_file(
input : 'win32/libpurplerc.rc.in',
output : 'libpurplerc.rc',
configuration : version_conf)
purple_coresources += windows.compile_resources(libpurplerc)
endif
purple_mediaheaders = [
'media/backend-iface.h',
'media/candidate.h',
'media/codec.h',
'media/enum-types.h'
]
purple_enumheaders = [
'account.h',
'buddyicon.h',
'connection.h',
'debug.h',
'eventloop.h',
'notify.h',
'plugins.h',
'purplechatuser.h',
'purpleconnectionerrorinfo.h',
'purplecontactinfo.h',
'purpleconversation.h',
'purpleimconversation.h',
'purplemessage.h',
'purplenotification.h',
'purpleplugininfo.h',
'purpleprotocol.h',
'purpleproxyinfo.h',
'roomlist.h',
'status.h',
'xfer.h',
'xmlnode.h'
]
enums = gnome.mkenums_simple('purpleenums',
sources : purple_enumheaders,
install_header : true,
install_dir : get_option('includedir') / purple_include_base)
enums_c = enums[0]
enums_h = enums[1]
PURPLE_H_INCLUDES = []
foreach header : purple_coreheaders + purple_mediaheaders + ['version.h', 'purpleenums.h']
PURPLE_H_INCLUDES += f'#include <libpurple/@header@>'
endforeach
purple_h_conf = configuration_data()
purple_h_conf.set('PURPLE_H_INCLUDES', '\n'.join(PURPLE_H_INCLUDES))
purple_h = configure_file(input : 'purple.h.in',
output : 'purple.h',
configuration : purple_h_conf,
install : true,
install_dir : get_option('includedir') / purple_filebase)
version_h = configure_file(input : 'version.h.in',
output : 'version.h',
configuration : version_conf,
install : true,
install_dir : get_option('includedir') / purple_include_base)
purple_builtsources = [
enums_c,
]
purple_builtheaders = [
purple_h,
version_h,
enums_h,
]
libpurple_inc = include_directories('.')
libpurple = library('purple3',
purple_coresources + purple_builtsources +
purple_builtheaders,
'purpleprivate.h',
c_args : ['-DPURPLE_COMPILATION', '-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Purple"'],
include_directories : [toplevel_inc, libpurple_inc],
install : true,
version : PURPLE_LIB_VERSION,
dependencies : # static_link_libs
[dnsapi, ws2_32, glib, gio, gplugin_dep, libsoup,
libxml, gdk_pixbuf, gstreamer, gstreamer_app, json,
sqlite3, math],
override_options : ['c_std=c99', 'warning_level=2'])
install_headers(purple_coreheaders,
subdir : purple_include_base)
install_headers(purple_mediaheaders,
subdir : purple_include_base / 'media')
pkgconfig.generate(
libpurple,
name : 'libpurple3',
description : 'libpurple3 is a GLib-based instant messenger library.',
version : meson.project_version(),
filebase : purple_filebase,
# TODO: Only use purple_filebase once everything is ported to only use purple.h
subdirs : [purple_filebase, purple_include_base],
# NOTE: Don't use gplugin from pkgconfig, as it might be a subproject.
requires : [glib, gdk_pixbuf, 'gplugin'],
variables : [
f'plugindir=${libdir}/@purple_filebase@',
])
if enable_introspection
introspection_sources = (purple_coresources + purple_coreheaders +
purple_builtheaders + purple_mediaheaders)
libpurple_gir = gnome.generate_gir(libpurple,
sources : introspection_sources,
includes : ['GdkPixbuf-2.0', 'GLib-2.0', 'Gio-2.0', 'GObject-2.0', 'Gst-1.0', 'GPlugin-1.0'],
header : 'purple.h',
namespace : 'Purple',
symbol_prefix : 'purple',
identifier_prefix : 'Purple',
export_packages : purple_filebase,
nsversion : f'@purple_major_version@.@purple_minor_version@',
dependencies: [gplugin_dep],
install : true,
extra_args : ['-DPURPLE_COMPILATION', '--quiet'])
purple_generated_sources += libpurple_gir
endif
libpurple_dep = declare_dependency(
# Ensure purple headers built before any dependencies:
sources : [purple_builtheaders] + purple_generated_sources,
include_directories : [toplevel_inc, libpurple_inc],
link_with : libpurple,
dependencies : [gdk_pixbuf, gstreamer, gplugin_dep, glib, gio])
meson.override_dependency(purple_filebase, libpurple_dep)
subdir('data')
subdir('tests')
subdir('plugins')
subdir('protocols')